passing password to rlogin

I have access to seperate Unix server that has specific scripts that I need to run from time to time. What I would like to do is pass my password in the script, instead of having to type the password then run the script all from the original script.

Is this possible?

:wink:

Why not use a .rhosts file to remove the need for supplying a password? Create it in the users home directory on the remote machine, syntax thus:

[hostname] [user]

Ensure the rlogind server is running on the remote machine, which is started from the internet services daemon "inetd" - see /etc/inetd.conf for the entry.

It would be handy to take a look at the remsh command, which can also work via the .rhosts file on a remote machine to execute commands on that remote server. remsh has a corresponding server remshd, started in the same way as rlogind.

Note, r* services are not very secure. But if that is not an issue then they are extremely easy to setup and use.

you could also always use Expect, which is an excellent language/utility that can do practically anything you want to do with output from various programs!