views:

552

answers:

2

Hello All , i want to make one script which will automatic telnet the system . I have to access from my system(Windows Xp) to my server(Linux)

spawn telnet <machine ip> expect "login:" send "<username>\n" expect "Password:" send "<password>\n"

Is the above script is correct? 1) If yes means, how can i access this script from my machine(WindowsXp)? 2) If yes means, i have to install expect package?

A: 

If I understand you. You can try these commands if you have trusted remote hosts and users.

C:\> telnet -l user_name

and provide the password

OR you can do something like Unix

C:\> echo command | telnet -l user_name

Also for other details on telnet refer this link.

Space
Its not exact one. But the link is given some input to me. Thanks
ASHOK
the commands are just examples. Please go through the details of telnet at the link to get your task done. If this is helpful for you please accept the answer.
Space
ASHOK
+1  A: 

use ssh instead of telnet and make use of public/private keys for authentication. then use putty with command-line-arguments to login without a password.

http://www.howtoforge.com/how-to-configure-ssh-keys-authentication-with-putty-and-linux-server-in-5-quick-steps

ppuschmann
ASHOK