I don't know about bitvise or why it changes behaviour after Windows update, but my assumption is that it stores connecting settings, including SSH server connection keys etc. Within Windows somehow, while PuTTY stores everything within its own created places (own registry entries, as far as I know).
Thanks @delano. So far this connection issue is particular for Cisco IPS device. Could you verify if the lib support this device? Or patch available for this device?
![The Ssh2 Session Has Terminated With Error. Reason: Error In Component Session/transport/kexhandler The Ssh2 Session Has Terminated With Error. Reason: Error In Component Session/transport/kexhandler](/uploads/1/2/3/7/123756059/665058153.png)
Here's the verbose log, it seems there's some handshake but failed at the second packet. Any idea? Help Appreciated? ❗️
irb(main):045:0> Net::SSH.start('xxxxx', 'xxxxxx', :verbose => :debug, :timeout => 3000)
D, [2013-04-08T14:07:36.211343 #22226] DEBUG -- net.ssh.transport.session[3fbafbe2c660]: establishing connection to 10.0.48.57:22
D, [2013-04-08T14:07:36.247885 #22226] DEBUG -- net.ssh.transport.session[3fbafbe2c660]: connection established
I, [2013-04-08T14:07:36.248026 #22226] INFO -- net.ssh.transport.server_version[3fbafbe28f74]: negotiating protocol version
D, [2013-04-08T14:07:36.991248 #22226] DEBUG -- net.ssh.transport.server_version[3fbafbe28f74]: remote is
D, [2013-04-08T14:07:37.030518 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: read 232 bytes
D, [2013-04-08T14:07:37.030635 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: received packet nr 0 type 20 len 228
I, [2013-04-08T14:07:37.030697 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: got KEXINIT from server
I, [2013-04-08T14:07:37.030774 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: sending KEXINIT
D, [2013-04-08T14:07:37.030898 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: queueing packet nr 0 type 20 len 1508
D, [2013-04-08T14:07:37.030962 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: sent 1512 bytes
I, [2013-04-08T14:07:37.031006 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: negotiating algorithms
D, [2013-04-08T14:07:37.031148 #22226] DEBUG -- net.ssh.transport.algorithms[3fbafbe28f9c]: negotiated:
kex: diffie-hellman-group14-sha1
host_key: ssh-rsa
encryption_server: aes128-cbc
encryption_client: aes128-cbc
hmac_client: hmac-sha1
hmac_server: hmac-sha1
compression_client: none
compression_server: none
language_client:
language_server:
D, [2013-04-08T14:07:37.031182 #22226] DEBUG -- net.ssh.transport.algorithms[3fbafbe28f9c]: exchanging keys
D, [2013-04-08T14:07:37.033253 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: queueing packet nr 1 type 30 len 268
D, [2013-04-08T14:07:37.033319 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: sent 272 bytes
D, [2013-04-08T14:09:36.993251 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: read 0 bytes
Net::SSH::Disconnect: connection closed by remote host
D, [2013-04-08T14:07:36.211343 #22226] DEBUG -- net.ssh.transport.session[3fbafbe2c660]: establishing connection to 10.0.48.57:22
D, [2013-04-08T14:07:36.247885 #22226] DEBUG -- net.ssh.transport.session[3fbafbe2c660]: connection established
I, [2013-04-08T14:07:36.248026 #22226] INFO -- net.ssh.transport.server_version[3fbafbe28f74]: negotiating protocol version
D, [2013-04-08T14:07:36.991248 #22226] DEBUG -- net.ssh.transport.server_version[3fbafbe28f74]: remote is
SSH-2.0-OpenSSH_5.3' D, [2013-04-08T14:07:36.991349 #22226] DEBUG -- net.ssh.transport.server_version[3fbafbe28f74]: local is
SSH-2.0-Ruby/Net::SSH_2.6.6 x86_64-linux'D, [2013-04-08T14:07:37.030518 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: read 232 bytes
D, [2013-04-08T14:07:37.030635 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: received packet nr 0 type 20 len 228
I, [2013-04-08T14:07:37.030697 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: got KEXINIT from server
I, [2013-04-08T14:07:37.030774 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: sending KEXINIT
D, [2013-04-08T14:07:37.030898 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: queueing packet nr 0 type 20 len 1508
D, [2013-04-08T14:07:37.030962 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: sent 1512 bytes
I, [2013-04-08T14:07:37.031006 #22226] INFO -- net.ssh.transport.algorithms[3fbafbe28f9c]: negotiating algorithms
D, [2013-04-08T14:07:37.031148 #22226] DEBUG -- net.ssh.transport.algorithms[3fbafbe28f9c]: negotiated:
kex: diffie-hellman-group14-sha1
host_key: ssh-rsa
encryption_server: aes128-cbc
encryption_client: aes128-cbc
hmac_client: hmac-sha1
hmac_server: hmac-sha1
compression_client: none
compression_server: none
language_client:
language_server:
D, [2013-04-08T14:07:37.031182 #22226] DEBUG -- net.ssh.transport.algorithms[3fbafbe28f9c]: exchanging keys
D, [2013-04-08T14:07:37.033253 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: queueing packet nr 1 type 30 len 268
D, [2013-04-08T14:07:37.033319 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: sent 272 bytes
D, [2013-04-08T14:09:36.993251 #22226] DEBUG -- tcpsocket[3fbafbe2958c]: read 0 bytes
Net::SSH::Disconnect: connection closed by remote host