in reply to Re: Issue with Net::SSH::Perl - can't establish connection
in thread Issue with Net::SSH::Perl - can't establish connection

There's a reason I have $USER and $USERNAME, but I see your point and I'll look at combining them. But that doesn't explain why the script is failing... It's reading my .ssh/config, pulling the correct key/user combo and sends them to the remote server. The remote server accepts the key, but then the script dies with the error...
  • Comment on Re^2: Issue with Net::SSH::Perl - can't establish connection

Replies are listed 'Best First'.
Re^3: Issue with Net::SSH::Perl - can't establish connection
by salva (Canon) on Jul 21, 2017 at 06:53 UTC
    Error reading response length from auth socket. at /usr/local/lib64/perl5/Net/SSH/Perl/Auth/PublicKey.pm line 104.

    That looks like the module is connecting to the local ssh agent and getting an unexpected response. Are your keys protected by a passphrase?

    I would run both the Perl script and the OpenSSH client with strace and see what both were doing different at the point of failure.

      Strange...yep, it's the connection to the local agent. I killed the existing agent (started when I logged in) and started a new one, and added the key. Connection successful! Now just need to figure out why the existing agent borked with Net::SSH::Perl but not with straight openssh... Thanks.