Question:
Using ssh chilkat 9.5.0.69 .net (Server is openSSH 3.5)
In a 2 node network, trying to connect and send commands, but OpenSessionChannel hangs and never exit.
Putty can connect to the server without any problem.
We manage multiple servers having the same openSSH version and configuration that we cannot change, so we wonder how to solve this.
Thanks
DebugLogFile with verbose logging and ReadTimeoutMs = 10 seconds:
Connect_Ssh: DllDate: Aug 30 2017 ChilkatVersion: 9.5.0.69 UnlockPrefix: LOCALPSSH Architecture: Little Endian; 32-bit Language: .NET 2.0 VerboseLogging: 1 connectInner: hostname: x.y.z.1 port: 22 preferRsaHostKeyAlgorithm: 1 sshConnect: connectSocket: domainOrIpAddress: x.y.z.1 port: 22 connectTimeoutMs: 30000 connect_ipv6_or_ipv4: This is an IPV4 numeric address. Domain to IP address resolution not needed. getAddressInfo: (leaveContext) findIpAddrInfo: (leaveContext) connecting to IPV4 address... ipAddress: x.y.z.1 createSocket: Setting SO_SNDBUF size sendBufSize: 262144 Setting SO_RCVBUF size recvBufSize: 4194304 (leaveContext) connect: Waiting for the connect to complete... ck_getsockname_ipv4: (leaveContext) myIP: x.y.z.2 myPort: 49817 socket connect successful. (leaveContext 16ms) (leaveContext 31ms) (leaveContext 47ms) Established TCP/IP connection with SSH server Turning on TCP_NODELAY. (leaveContext 47ms) sshSetupConnection: clientIdentifier: SSH-2.0-PuTTY_Release_0.69 Sending client identifier... Done sending client identifier. Reading server version... initialDataFromSshServer: SSH-1.99-OpenSSH_3.5p1 serverVersion: SSH-1.99-OpenSSH_3.5p1 build_kexInit: preferRsaHostKeyAlgorithm: 1 (leaveContext) KeyExchangeAlgs: algorithm: diffie-hellman-group-exchange-sha1 algorithm: diffie-hellman-group1-sha1 (leaveContext) HostKeyAlgs: algorithm: ssh-rsa algorithm: ssh-dss (leaveContext) EncCS: algorithm: aes128-cbc algorithm: 3des-cbc algorithm: blowfish-cbc algorithm: cast128-cbc algorithm: arcfour algorithm: aes192-cbc algorithm: aes256-cbc algorithm: rijndael-cbc@lysator.liu.se (leaveContext) EncSC: algorithm: aes128-cbc algorithm: 3des-cbc algorithm: blowfish-cbc algorithm: cast128-cbc algorithm: arcfour algorithm: aes192-cbc algorithm: aes256-cbc algorithm: rijndael-cbc@lysator.liu.se (leaveContext 16ms) MacCS: algorithm: hmac-md5 algorithm: hmac-sha1 algorithm: hmac-ripemd160 algorithm: hmac-ripemd160@openssh.com algorithm: hmac-sha1-96 algorithm: hmac-md5-96 (leaveContext 15ms) MacSC: algorithm: hmac-md5 algorithm: hmac-sha1 algorithm: hmac-ripemd160 algorithm: hmac-ripemd160@openssh.com algorithm: hmac-sha1-96 algorithm: hmac-md5-96 (leaveContext) CompCS: algorithm: none algorithm: zlib (leaveContext) CompSC: algorithm: none algorithm: zlib (leaveContext) LangCS: (leaveContext) LangSC: (leaveContext) ChosenIncomingEncryption: aes128-cbc ChosenOutgoingEncryptoin: aes128-cbc ChosenIncomingMac: hmac-sha1 ChosenOutgoingMac: hmac-sha1 ChosenIncomingCompression: zlib ChosenOutgoingCompression: zlib ChosenKexAlgorithm: diffie-hellman-group-exchange-sha1 choose_hostkey_algorithm: (leaveContext) ChosenHostKeyAlgorithm: ssh-rsa numBits: 128 pbits: 1024 Using GEX Group. Sending KEX_DH_GEX_REQUEST... pbits: 1024 Received GEX Group. sendDhInit: create_E: (leaveContext 31ms) Sent: SSH2_MSG_KEX_DH_GEX_INIT (leaveContext 31ms) computeExchangeHash: dhReplyMsgType: 33 serverVersion: [SSH-1.99-OpenSSH_3.5p1] Using SHA-1 for Key Exchange Hash (leaveContext) verifyHostKey: rsaHostKeyVerify: alg: ssh-rsa hostKeyNumBits: 1024 verifyHashSsh: Pkcs1_5_decode: (leaveContext) (leaveContext) (leaveContext) RSA host key signature verification success. (leaveContext 16ms) Sending newkeys to server... Expecting newkeys from server... SSH Key Exchange Success. installNewKeys: m_isRekey: 0 Outgoing compression is now zlib. Incoming compression is now zlib. Outgoing encryption is now AES 128 CBC initCrypt_aes2: (leaveContext) initCrypt_aes2: (leaveContext 15ms) (leaveContext 15ms) (leaveContext 265ms) Turning on TCP_NODELAY. socketOptions: SO_SNDBUF: 262144 SO_RCVBUF: 4194304 TCP_NODELAY: 1 SO_KEEPALIVE: 0 (leaveContext) (leaveContext 328ms) Success. (leaveContext 343ms) AuthenticatePw: DllDate: Aug 30 2017 ChilkatVersion: 9.5.0.69 UnlockPrefix: LOCALPSSH Architecture: Little Endian; 32-bit Language: .NET 2.0 VerboseLogging: 1 SshVersion: SSH-1.99-OpenSSH_3.5p1 login: [root] sshAuthenticatePw: requestUserAuthService: sendServiceRequest: svcName: ssh-userauth SentServiceReq: ssh-userauth (leaveContext 16ms) ssh-userauth service accepted. (leaveContext 16ms) sendUserAuthQuery: (leaveContext) AuthMethods: publickey,password,keyboard-interactive passwordAuth: Sent login/password Password authentication successful. (leaveContext 16ms) (leaveContext 32ms) Success. (leaveContext 47ms) SendIgnore: DllDate: Aug 30 2017 ChilkatVersion: 9.5.0.69 UnlockPrefix: LOCALPSSH Architecture: Little Endian; 32-bit Language: .NET 2.0 VerboseLogging: 1 SshVersion: SSH-1.99-OpenSSH_3.5p1 Success. (leaveContext 15ms) OpenSessionChannel: DllDate: Aug 30 2017 ChilkatVersion: 9.5.0.69 UnlockPrefix: LOCALPSSH Architecture: Little Endian; 32-bit Language: .NET 2.0 VerboseLogging: 1 openSessionChannel: sshTransportOpenChannel: channelType: session clientChannel: 100 clientInitialWindowSize: 2097152 clientMaxPacketSize: 8192 Sent open channel request Error reading channel response. (leaveContext 10312ms) (leaveContext 10312ms) retval: -1 (leaveContext 10328ms)