Hi,
Thanks for your reply. Through manually I can log on to a remote server through putty by using telnet. Then I executed some commands to get some work done. But I have executed following code, but getting the error as follows "timed-out waiting for command prompt at telnet.pl "line 10
use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/bash\$ $/'); $host="10.10.10.10"; $username="xyz"; $passwd="xyz1"; $t->open($host); $t->login($username, $passwd); @lines = $t->cmd("who"); print @lines;
The remote server in my case is only supported telnet, because if I select SSH option in putty, I can't log on into the server.
To perform those tasks automatically I need some Perl code, as I am working in a automation project.
Regards,
Sanjay
In reply to Re^2: how to connect to a remote server through telnet and fire couple of commands?
by nayaksan76
in thread how to connect to a remote server through telnet and fire couple of commands?
by nayaksan76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |