Question : Telnet comand

I need a script that connect to a server, make the login, run a command and print the output.

How to do it?

Answer : Telnet comand

:

  use Net::Telnet ();
   $t = new Net::Telnet (Timeout => 15);
   $username = "";
   $passwd = "password";
   $t->open("systemIP");
   $t->login($username, $passwd);
   @lines = $t->cmd("dir");
   print @lines;
Random Solutions  
 
programming4us programming4us