http://www.perlmonks.org?node_id=1016744


in reply to Login timed out - Net::SSH::Expect

Hi Jose, I ran this successfully:
use strict; use warnings; use Net::SSH::Expect; my $ip ='xxx.xxx.xxx.xxx'; my $pass = 'somepassword'; my $ssh = Net::SSH::Expect->new( host => $ip, password => $pass, user => 'yagna', raw_pty => 1 ); my $login_output = $ssh->login(); sleep 10; my $who = $ssh->exec("who"); print ($who); $ssh->close();


Can you try with a login that is other than root? It is possible that you have changed config to allow root access via ssh. Let me know how it goes. Are you using perl on unix Or Perl on windows? Thanks, Yagna