1

I have a admin server A which have root ssh trust for all other servers, and A can ssh most other servers without password, but for server B, it always says connection to B closed by remote host. Bellow is the ssh -vvv

serverA:~/.ssh2 # ssh -vvv user@serverB
2015-07-23 10:10:03  debug(1) pid=24134 Connecting to serverB [10.xxx.xxx.xxx] port 22 address family IPv4.
2015-07-23 10:10:03  debug(2) pid=24134 HPN: is disable. Not setting SO_RCVBUF.
2015-07-23 10:10:03  debug(2) category(Network)  pid=24134 fd 3 setting O_NONBLOCK
2015-07-23 10:10:03  debug(1) category(Network)  pid=24134 fd 3 clearing O_NONBLOCK
2015-07-23 10:10:03  debug(1) pid=24134 Connection established to 10.xxx.xxx.xxx.
2015-07-23 10:10:03  debug(1) category(Misc)  pid=24134 permanently_set_uid: 0/0
2015-07-23 10:10:03  debug(2) pid=24134 Load RFC 4716 compliant public key type 0 successfully from file /root/.ssh2/hostkey.serverA.pub
2015-07-23 10:10:03  debug(1) pid=24134 key file /root/.ssh2/hostkey.serverA type 0
2015-07-23 10:10:03  debug(1) pid=24134 Remote protocol version 2.0, remote software version ReflectionForSecureIT_7.2.1.99
2015-07-23 10:10:03  debug(1) pid=24134 no match: ReflectionForSecureIT_7.2.1.99
2015-07-23 10:10:03  debug(1) pid=24134 Local version string SSH-2.0-ReflectionForSecureIT_7.2.1.99
2015-07-23 10:10:03  debug(2) category(Network)  pid=24134 fd 3 setting O_NONBLOCK
2015-07-23 10:10:03  debug(1) pid=24134 Disabling compression in myproposal
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_KEXINIT sent
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_KEXINIT received
2015-07-23 10:10:03  debug(1) pid=24134 KEX_INIT_SENT
2015-07-23 10:10:03  debug(2) pid=24134 chooseConf: client proposal sent:
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[0] =  diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[1] =  x509v3-sign-rsa,x509v3-sign-dss,ssh-dss,ssh-rsa
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[2] =  aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,blowfish-cbc,3des-cbc,cast128-cbc,arcfour,arcfour128,arcfour256
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[3] =  aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,blowfish-cbc,3des-cbc,cast128-cbc,arcfour,arcfour128,arcfour256
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[4] =  hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[5] =  hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[6] =  none
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[7] =  none
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[8] =  
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[9] =  
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: first_kex_follows 0 
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: reserved 0 
2015-07-23 10:10:03  debug(2) pid=24134 chooseConf: server proposal received:
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[0] =  diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[1] =  ssh-rsa
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[2] =  aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,blowfish-cbc,3des-cbc,cast128-cbc,arcfour,arcfour128,arcfour256
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[3] =  aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc,blowfish-cbc,3des-cbc,cast128-cbc,arcfour,arcfour128,arcfour256
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[4] =  hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[5] =  hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[6] =  none,zlib@openssh.com,zlib
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[7] =  none,zlib@openssh.com,zlib
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[8] =  
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: proposal[9] =  
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: first_kex_follows 0 
2015-07-23 10:10:03  debug(2) pid=24134 buf2prop: reserved 0 
2015-07-23 10:10:03  debug(2) pid=24134 Mac::init: found hmac-sha1
2015-07-23 10:10:03  debug(1) pid=24134 The server will use the following algorithms to communicate with the client: aes128-ctr hmac-sha1 none
2015-07-23 10:10:03  debug(2) pid=24134 Mac::init: found hmac-sha1
2015-07-23 10:10:03  debug(1) pid=24134 The client will use the following algorithms to communicate with the server: aes128-ctr hmac-sha1 none
2015-07-23 10:10:03  debug(2) pid=24134 generateKey: priv key bits set: 161/320
2015-07-23 10:10:03  debug(2) pid=24134 bits set: 1014/2048
2015-07-23 10:10:03  debug(1) pid=24134 sending SSH2_MSG_KEXDH_INIT
2015-07-23 10:10:03  debug(1) pid=24134 expecting SSH2_MSG_KEXDH_REPLY
2015-07-23 10:10:03  debug(2) pid=24134 Load RFC 4716 compliant public key type 0 successfully from file /root/.ssh2/hostkeys/key_22_serverB,10.xxx.xxx.xxx.pub
2015-07-23 10:10:03  debug(1) pid=24134 check_hostkey_in_hostkeys_by_key: key matches file /root/.ssh2/hostkeys/key_22_serverB,10.xxx.xxx.xxx.pub, returning HOST_OK
2015-07-23 10:10:03  debug(1) pid=24134 Host 'serverB,10.xxx.xxx.xxx' is known and matches the RSA host key.
2015-07-23 10:10:03  debug(2) pid=24134 bits set: 994/2048
2015-07-23 10:10:03  debug(2) pid=24134 ssh_rsa_verify: using digest algorithm: 64 (SHA-1)
2015-07-23 10:10:03  debug(1) pid=24134 ssh_rsa_verify: signature correct
2015-07-23 10:10:03  debug(2) pid=24134 deriveKeys
2015-07-23 10:10:03  debug(2) pid=24134 set_newkeys: mode 1
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_NEWKEYS sent
2015-07-23 10:10:03  debug(1) pid=24134 expecting SSH2_MSG_NEWKEYS
2015-07-23 10:10:03  debug(2) pid=24134 set_newkeys: mode 0
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_NEWKEYS received
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_SERVICE_REQUEST sent
2015-07-23 10:10:03  debug(2) pid=24134 service_accept: ssh-userauth
2015-07-23 10:10:03  debug(1) pid=24134 SSH2_MSG_SERVICE_ACCEPT received
2015-07-23 10:10:03  debug(2) pid=24134 added key: /root/.ssh2/hostkey.serverA (0x853b10)
************************************************
Use of this system by unauthorized persons or   
in an unauthorized manner is strictly prohibited
************************************************
2015-07-23 10:10:03  debug(2) pid=24134 Querying server for authmethod - gssapi-with-mic
2015-07-23 10:10:03  debug(1) pid=24134 Delegating credentials
2015-07-23 10:10:03      info pid=24134 Authentication successful.
2015-07-23 10:10:03  debug(1) pid=24134 HPN: TcpRcvBufPoll = Yes
2015-07-23 10:10:03  debug(1) pid=24134 HPN: TcpRcvBufPoll=Yes, TcpRcvBuf = Auto
2015-07-23 10:10:03  debug(1) pid=24134 HPN: Final HPNBufferSize: 131072 bytes
2015-07-23 10:10:03  debug(2) pid=24134 HPN: disabled=0
2015-07-23 10:10:03  debug(2) pid=24134 HPN: Final TCP window size: 131072 bytes
2015-07-23 10:10:03  debug(1) pid=24134 channel 0: new [client-session]
2015-07-23 10:10:03  debug(1) pid=24134 HPN: Dynamic window scaling enabled.
2015-07-23 10:10:03  debug(2) pid=24134 channel 0: send open
2015-07-23 10:10:03  debug(1) pid=24134 Entering interactive session.
2015-07-23 10:10:03  debug(1) pid=24134 channel 0: free: client-session, nchannels 1
Connection to serverB closed by remote host.
Connection to serverB closed
2015-07-23 10:10:03  debug(1) pid=24134 Transferred: stderr 78 bytes in 0.0 seconds
2015-07-23 10:10:03  debug(1) pid=24134 Bytes per second: stderr 500238.1
2015-07-23 10:10:03  debug(1) pid=24134 ClientLoop::execute() returns -1
  • try this answer to root ssh problems on ubuntu. – meuh Jul 23 '15 at 7:58
  • Can you ssh to B manually using the password? – Katu Jul 23 '15 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.