0

Hi all

I want to login a machine remotely and doing some operation on the remote machine and then exit the remote machine by a unix shell script. I can login these two machines without passward. How can I do that?

For example, my script is on machine1. that script remotely login to machine2 and do some operation on machine2. After doing that it exits machine2 and back to machine1. I had tried with this script from a machine1

#!/bin/bash
clear
ssh -Y  sudipta@machine2.chem.udel.edu <<EOF
echo 'welcome machine2'
EOF

However, it is giving 'Pseudo-terminal will not be allocated because stdin is not a terminal.' this error.

Thanks in advance
Sudipta

Edited by pritaeas: Moved.

4
Contributors
3
Replies
32
Views
4 Years
Discussion Span
Last Post by rubberman
0

Hello,

The appliation yo are looking for is called rsh or remote shell. Try
man rsh
from google or the command prompt for more information.

0

Stick with ssh. You might want to have the script run your log out script. By default ~/.bash_logout

0

What here2serve said. Most systems these days disable stuff like rsh because it is insecure. You can run scripts with ssh much like rsh, but it is much more controllable and secure. See the ssh man page for more information.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.