Hope you never understood my question.I know how to connect remote machine by using putty,telnet etc..But I am trying to automate the same,i.e When I run my script without asking the servername,user and password the promt should display for me to do something.
But the code I have already given is connecting in background and i want todo the same as foreground.