One Question related to alias

Hello,
I have created following alias in csh

lab 'rlogin -l user23 complab23'

but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets locked.

Could someone suggest me another solution ?
Is there any way to create shell script which will login to this complab23 server usign user23 account and then return control to my terminal,. something llike below

rlogin -l user23 complab23 << EOF
passw0rd!!!
EOF
command which will make shell interactive and return control to terminal.

Ok - caveat - storing passwords in a file in plaintext is a bad idea....but if you want to do this you can use expect.

The following code should work:

#!/usr/bin/expect
spawn rsh -l user23 complab23
match_max 100000 
expect "assword: "
send "<insert your password here>\r"
interact 
exit

You could try creating an .rhosts file under your home directory of the target machine with name of the machine from which you attempt to make the connection.

cat /home/user/.rhosts
HostFromWhichDoRlogin YourUsername

Pls see man rhosts from more info

Thanks
Nagarajan G

ssh with keys

Like you got this above:
SSH with Authentication keys :b:
This is how you should do it. And remember - if you keep your password in plain text:eek: then it is almost like you are creating a public account where anyone can log-in.