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