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

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.

Replies are listed 'Best First'.
Re^4: Issue with Net::SSH::Perl - can't establish connection
by dayton (Acolyte) on Jul 21, 2017 at 15:42 UTC
    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.