{
sleep 2
echo "$user"
sleep 2
echo "$password"
sleep 2
echo " ls"
sleep 10
echo "exit"
}| telnet $server
I have a machine x and i have executed the above script on machine 'x'.
i entered the appropriate user and password in the script and gave the ipaddress of the server in telnet $server.
When i executed this script on machine x, telnet started to another machine, took the user name and password and got logged in. It then executed the "ls" and "exit" commands from the script.
But i removed the exit command and executed the script, I got the prompt on the other machine, but i am not able to execute any commands and the prompt hangs.
HELP ME OUT !!!!!!!!!!!!!!!!!!!!