<?xml version="1.0" encoding="windows-1252"?>
<node id="1016718" title="Login timed out - Net::SSH::Expect" created="2013-02-02 09:46:46" updated="2013-02-02 09:46:46">
<type id="115">
perlquestion</type>
<author id="898593">
j0se</author>
<data>
<field name="doctext">
Hello monks,

I am using [cpan://Net::SSH::Expect] to connect to a remote host and execute commands there:

&lt;code&gt;
use strict;
use warnings;
use Net::SSH::Expect;

my $ssh = Net::SSH::Expect-&gt;new(
    host     =&gt; $ip,
    password =&gt; $pass,
    user     =&gt; 'root',
    raw_pty  =&gt; 1
);

my $login_output = $ssh-&gt;login();
sleep 10;

# run arbitrary commands, like
$ssh-&gt;exec("ls -l /");
&lt;/code&gt;

I am getting the following error:
&lt;code&gt;
SSHAuthenticationError Login timed out. The input stream currently has the contents bellow: Warning: Permanently added '&lt;IP_ADDRESS&gt;' (RSA) to the list of known hosts.
 at /usr/local/share/perl/5.10.1/Expect.pm line 828.
&lt;/code&gt;

I even set &lt;c&gt;~/.ssh/config&lt;/c&gt;:
&lt;code&gt;
# Bypass SSH key checking
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null
&lt;/code&gt;

Can you see the problem? Thanks.

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-898593"&gt;
&lt;p&gt;
&lt;font size="-2"&gt;
We are what we repeatedly do. Excellence, then, is not an act but a habit. -- Will Durant (Aristotle)
&lt;/font&gt;
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
