logging to remote server

Hi,

I want to log-in to a remote server using shell script.

The server requires the following while allowing a connection:

username
password
one - letter authorisation.

How can i implement this in my script?

thanks,

abey

try man page for ftp or rlogin.

for ftp use syntax as
export FTP_HOST=
export FTP_UID=
export FTP_PWD=
export FTP_DIR=

ftp -n << EOF!
open ${FTP_HOST}
user ${FTP_UID} ${FTP_PWD}

commands
quit
EOF!

Regards,
Manish Jha

Thanks for replying..

The reason i need to log in to the server is to run a script in it. so ftp wont work rite. please let me know if there is any other way.

thanks

abey

to run a script in remote server,

you can check for
rsh,
ssh

Many thanks..

I'm using HP-UX 11, it seems like this doesn't support rsh and ssh. I didn't find a man entry for these commands. Hope there is some other way for running scripts in a remote machine.

thanks
abey

If you're using HP-UX you should have remsh available. The "remsh" allows you to access remote machines, assuming you have authority to do so, and
execute programs, commands et al. You should examine the man page for remsh, you should find it useful.

Good luck!
:slight_smile:

As mr-synapse told you
HP-UX has the remsh command.
Albeit, I would advise you to use SSH instead.
Nowadays no r* commands should be used anymore
becuase passwords are transmitted in clear text.
You can download the HP-UX SSH port as ready bundeled depot from here
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
and simply install it via swinstall