2

无法登录机器...但使用相同的凭据我可以登录机器

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 登录超时。输入流当前的内容如下: root@9.118.46.36 的密码: at /usr/local/share/perl/5.14.2/Expect.pm line 828

4

1 回答 1

0

我将超时时间增加到 30 并且它可以工作......有没有办法检查应该是什么超时时间。随着系统负载的增加,超时 30 也可能不起作用。

于 2012-07-23T07:00:17.653 回答