use strict; use warnings; use Net::SSH::Perl(); my $Host = "ip1.ip2.ip2.ip4"; my $Port = "1234"; my $passwd = "psw"; my $username = "user"; my $t = New Net::SSH::Perl(Timeout => 30); $t->open(Host => $Host,Port => $Port); $t->errmode("return"); $t->waitfor('/:/'); $t->print($username); $t->waitfor('/:/'); $t->print($passwd);