简体   繁体   中英

not able to ssh to remote machine

Not able to login to machine... but using the same credential i can log in to the machine

my $ssh = Net::SSH::Expect->new (host => "9.118.46.36", password=> 'test01', user => 'root', raw_pty => 1, timeout => 20);

    # establishes the ssh connection, 
    # authenticating with that user and password
    $ssh->login();

SSHAuthenticationError Login timed out. The input stream currently has the contents bellow: root@9.118.46.36's password: at /usr/local/share/perl/5.14.2/Expect.pm line 828

I increased the timeout to 30 and it works... Is there any way to check what should be the time out. As system load increase timeout 30 also may not work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM