2007fld has asked for the wisdom of the Perl Monks concerning the following question:

I'm running sftp from a Solaris server to a Windows server. The manual session is working. But when I use Net::SSH::Perl, the session hangs at "Waiting for NEWKEYS message.";

server1.com: Reading configuration data /export/home/xxxxx/.ssh/config
server1.com: Reading configuration data /etc/ssh_config
server1.com: Connecting to sftp.docufree.com, port 22.
server1.com: Remote version string: SSH-2.0-2.0
server1.com: Remote protocol version 2.0, remote software version 2.0
server1.com: Net::SSH::Perl Version 1.30, protocol version 2.0.
' matches pattern '^2\.'. match: '2.0
server1.com: Connection established.
server1.com: Sent key-exchange init (KEXINIT), wait response.
server1.com: Algorithms, c->s: 3des-cbc hmac-sha1 none
server1.com: Algorithms, s->c: 3des-cbc hmac-sha1 none
server1.com: Entering Diffie-Hellman Group 1 key exchange.
server1.com: Sent DH public key, waiting for reply.
server1.com: Received host key, type 'ssh-dss'.
server1.com: Host 'sftp.xxxx.com' is known and matches the host key.
server1.com: Computing shared secret key.
server1.com: Verifying server signature.
server1.com: Waiting for NEWKEYS message.

I know the next line should be "Enabling incoming encryption/MAC/compression". So maybe encryption is an issue here? I know the remote Windows server only only support AES (128 | 256). What encryption Net::SSH::Perl is using? 3des?

I just can not figure out why it hangs at "Waiting for NEWKEYS message"? What is the NEWKEYS message?
  • Comment on Net::SSH::Perl hangs at "Waiting for NEWKEYS message."

Replies are listed 'Best First'.
Re: Net::SSH::Perl hangs at "Waiting for NEWKEYS message."
by salva (Canon) on Jan 19, 2010 at 15:39 UTC
Re: Net::SSH::Perl hangs at "Waiting for NEWKEYS message."
by 2007fld (Acolyte) on Jan 19, 2010 at 15:48 UTC
    I have to use Net::SSH, and it is working with all other connections/servers.
      well, then, as the issue is probably related to some deficiency on the module itself and nobody is maintaining it, you have two options:
      • solve it yourself
      • pay somebody to do it for you
      Just don't expect somebody to stand up and do it for fun, the module is far too complex for that to happen.