hansonhhr opened a new issue, #709: URL: https://github.com/apache/mina-sshd/issues/709
### Version Ssh client: mina 2.13.2 Ssh server: openssh 4.5p1 ### Description On the Server side, the sshd_config file is configured with `ClientAliveInterval 5` and `ClientAliveCountMax 3`. The client can successfully connect to the server, but after a few [keepal...@openssh.com](mailto:keepal...@openssh.com) requests (about 20 seconds), the connection will drop, but if I keep typing, the connection will stay. Scan the log I see the following message: 1. Server sends a [keepal...@openssh.com](mailto:keepal...@openssh.com) request to the client 2. Client returns SSH_MSG_CHANNEL_SUCCESS to the server 3. Server sends SSH_MSG_UNIMPLEMENTED to client 4. The connection is dropped after the server sends three SSH_MSG_UNIMPLEMENTED messages to the client Client log ``` 14:20:12.463 [main] INFO org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar - getOrCreateProvider(BC) created instance of org.bouncycastle.jce.provider.BouncyCastleProvider 14:20:12.468 [main] INFO org.apache.sshd.common.util.security.eddsa.EdDSASecurityProviderRegistrar - getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider 14:20:13.162 [main] INFO org.apache.sshd.common.io.DefaultIoServiceFactoryFactory - No detected/configured IoServiceFactoryFactory; using Nio2ServiceFactoryFactory 14:20:13.185 [main] DEBUG org.apache.sshd.client.config.hosts.DefaultConfigFileHostEntryResolver - reloadHostConfigEntries(root@10.12.105.220:22/null) check permissions of C:\Users\qz\.ssh\config 14:20:13.190 [main] INFO org.apache.sshd.client.config.hosts.DefaultConfigFileHostEntryResolver - resolveEffectiveResolver(root@10.12.105.220:22) loaded 1 entries from C:\Users\qz\.ssh\config 14:20:13.191 [main] DEBUG org.apache.sshd.client.config.hosts.DefaultConfigFileHostEntryResolver - resolveEffectiveHost(root@10.12.105.220:22/null) => null 14:20:13.191 [main] DEBUG org.apache.sshd.client.SshClient - connect(root@10.12.105.220:22) no overrides 14:20:13.197 [main] DEBUG org.apache.sshd.common.io.nio2.Nio2Connector - Connecting to /10.12.105.220:22 14:20:13.201 [main] DEBUG org.apache.sshd.common.io.nio2.Nio2Connector - setOption(SO_REUSEADDR)[true] from property=Property[socket-reuseaddr](Boolean] 14:20:13.205 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.common.io.nio2.Nio2Connector - connect(/10.12.105.220:22): waiting for connection (timeout=60000ms) 14:20:13.208 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - Creating IoSession on /0:0:0:0:0:0:0:0:51929 from /10.12.105.220:22 via null 14:20:13.230 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - Client session created: Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22] 14:20:13.232 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientUserAuthService - ClientUserAuthService(ClientSessionImpl[null@/10.12.105.220:22]) client methods: [publickey, keyboard-interactive, password] 14:20:13.239 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.common.session.helpers.SessionTimeoutListener - sessionCreated(ClientSessionImpl[null@/10.12.105.220:22]) tracking 14:20:13.239 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - initializeProxyConnector(ClientSessionImpl[null@/10.12.105.220:22]) no proxy to initialize 14:20:13.242 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - sendIdentification(ClientSessionImpl[null@/10.12.105.220:22]): SSH-2.0-APACHE-SSHD-2.13.2 14:20:13.243 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 28 bytes 14:20:13.246 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - sendKexInit(ClientSessionImpl[null@/10.12.105.220:22]) Send SSH_MSG_KEXINIT 14:20:13.253 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[null@/10.12.105.220:22]) packet #0 sending command=20[SSH_MSG_KEXINIT] len=1370 14:20:13.253 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 1384 bytes 14:20:13.256 [sshd-SshClient[f0020b1]-nio2-resume-thread-1] DEBUG org.apache.sshd.client.SshClient - setupDefaultSessionIdentities(ClientSessionImpl[root@/10.12.105.220:22]) key identity provider override in session listener 14:20:13.258 [main] DEBUG org.apache.sshd.client.future.DefaultConnectFuture - Connected to /10.12.105.220:22 after 51916500 nanos 14:20:13.259 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doReadIdentification(ClientSessionImpl[root@/10.12.105.220:22]) line='SSH-2.0-OpenSSH_4.5' 14:20:13.260 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - readIdentification(ClientSessionImpl[root@/10.12.105.220:22]) Server version string: SSH-2.0-OpenSSH_4.5 14:20:13.262 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #0 SSH_MSG_KEXINIT 14:20:13.262 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleKexInit(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_KEXINIT 14:20:13.266 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - negotiate(ClientSessionImpl[root@/10.12.105.220:22]) strict KEX=false client=true server=false 14:20:13.270 [main] DEBUG org.apache.sshd.client.session.ClientSessionImpl - addPasswordIdentity(ClientSessionImpl[root@/10.12.105.220:22]) SHA256:BSOUTT9O52kIUr6Vp5JW/1TKl8hcxXx7RXN1rTLfQVU 14:20:13.272 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: kex algorithms = diffie-hellman-group-exchange-sha256 14:20:13.272 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: server host key algorithms = ssh-rsa 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: encryption algorithms (client to server) = aes128-ctr 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: encryption algorithms (server to client) = aes128-ctr 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: mac algorithms (client to server) = hmac-sha1 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: mac algorithms (server to client) = hmac-sha1 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: compression algorithms (client to server) = none 14:20:13.273 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setNegotiationResult(ClientSessionImpl[root@/10.12.105.220:22]) Kex: compression algorithms (server to client) = none 14:20:13.274 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.kex.DHGEXClient - init(DHGEXClient[diffie-hellman-group-exchange-sha256])[ClientSessionImpl[root@/10.12.105.220:22]] Send SSH_MSG_KEX_DH_GEX_REQUEST - min=2048, prf=4096, max=8192 14:20:13.274 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #1 sending command=34[SSH_MSG_KEX_DH_GEX_REQUEST] len=13 14:20:13.275 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 32 bytes 14:20:13.296 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #1 31 14:20:13.297 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.kex.DHGEXClient - next(DHGEXClient[diffie-hellman-group-exchange-sha256])[ClientSessionImpl[root@/10.12.105.220:22]] process command=SSH_MSG_KEX_DH_GEX_GROUP (expected=SSH_MSG_KEX_DH_GEX_GROUP) 14:20:13.428 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.kex.DHGEXClient - next(DHGEXClient[diffie-hellman-group-exchange-sha256])[ClientSessionImpl[root@/10.12.105.220:22]] Send SSH_MSG_KEX_DH_GEX_INIT 14:20:13.429 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #2 sending command=32[SSH_MSG_KEX_DH_GEX_INIT] len=517 14:20:13.429 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 536 bytes 14:20:13.429 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleKexMessage(ClientSessionImpl[root@/10.12.105.220:22])[diffie-hellman-group-exchange-sha256] more KEX packets expected after cmd=31 14:20:13.433 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #2 SSH_MSG_KEX_DH_GEX_REPLY 14:20:13.433 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.kex.DHGEXClient - next(DHGEXClient[diffie-hellman-group-exchange-sha256])[ClientSessionImpl[root@/10.12.105.220:22]] process command=SSH_MSG_KEX_DH_GEX_REPLY (expected=SSH_MSG_KEX_DH_GEX_REPLY) 14:20:13.433 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.kex.DHGEXClient - next(DHGEXClient[diffie-hellman-group-exchange-sha256])[ClientSessionImpl[root@/10.12.105.220:22]] validate SSH_MSG_KEX_DH_GEX_REPLY - min=2048, prf=4096, max=8192 14:20:13.613 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setServerKey(ClientSessionImpl[root@/10.12.105.220:22]) keyType=ssh-rsa, digest=SHA256:zatA508bPq+PJqJ5ZC/VkhaLkRYReWhDU5Ckw3KzxmA 14:20:13.613 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleKexMessage(ClientSessionImpl[root@/10.12.105.220:22])[diffie-hellman-group-exchange-sha256] KEX processing complete after cmd=33 14:20:13.613 [sshd-SshClient[f0020b1]-nio2-thread-7] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /10.12.105.220:22 presented unverified RSA key: SHA256:zatA508bPq+PJqJ5ZC/VkhaLkRYReWhDU5Ckw3KzxmA 14:20:13.614 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - checkKeys(ClientSessionImpl[root@/10.12.105.220:22]) key=ssh-rsa-SHA256:zatA508bPq+PJqJ5ZC/VkhaLkRYReWhDU5Ckw3KzxmA, verified=true 14:20:13.614 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - sendNewKeys(ClientSessionImpl[root@/10.12.105.220:22]) Send SSH_MSG_NEWKEYS 14:20:13.614 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - prepareNewKeys(ClientSessionImpl[root@/10.12.105.220:22]) session ID=e9:99:0d:41:34:47:84:c8:33:c4:59:39:ba:68:37:eb:a6:50:1f:de:ba:6d:b5:e4:2c:15:68:1c:20:65:2a:14 14:20:13.639 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #3 sending command=21[SSH_MSG_NEWKEYS] len=1 14:20:13.639 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 16 bytes 14:20:13.668 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setOutputEncoding(ClientSessionImpl[root@/10.12.105.220:22]): cipher BaseCTRCipher[AES, ivSize=16, kdfSize=16,AES/CTR/NoPadding, blkSize=16]; mac BaseMac[HmacSHA1] - block=20/20 bytes, encrypt-then-mac=false; compression none[Deflater/-1]; blocks limit 134217728 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleNewKeys(ClientSessionImpl[root@/10.12.105.220:22]) No pending packets to flush at end of KEX 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #3 SSH_MSG_NEWKEYS 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleNewKeys(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_NEWKEYS command=SSH_MSG_NEWKEYS 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - setInputEncoding(ClientSessionImpl[root@/10.12.105.220:22]): cipher BaseCTRCipher[AES, ivSize=16, kdfSize=16,AES/CTR/NoPadding, blkSize=16]; mac BaseMac[HmacSHA1] - block=20/20 bytes, encrypt-then-mac=false; compression none[Inflater/-1]; blocks limit 4294967296 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - sendInitialServiceRequest(ClientSessionImpl[root@/10.12.105.220:22]) Send SSH_MSG_SERVICE_REQUEST for ssh-userauth 14:20:13.670 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #4 sending command=5[SSH_MSG_SERVICE_REQUEST] len=17 14:20:13.671 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 68 bytes 14:20:13.671 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientUserAuthService - auth(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST for 'none' 14:20:13.671 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #5 sending command=50[SSH_MSG_USERAUTH_REQUEST] len=35 14:20:13.672 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 84 bytes 14:20:13.680 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #4 SSH_MSG_SERVICE_ACCEPT 14:20:13.681 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientSessionImpl - handleServiceAccept(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_SERVICE_ACCEPT service=ssh-userauth 14:20:13.727 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #5 SSH_MSG_USERAUTH_FAILURE 14:20:13.728 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientUserAuthService - processUserAuth(ClientSessionImpl[root@/10.12.105.220:22]) Received SSH_MSG_USERAUTH_FAILURE - partial=false, methods=publickey,password 14:20:13.728 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) starting authentication mechanisms: client=[publickey, keyboard-interactive, password], server=[publickey, password] 14:20:13.728 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) attempting method=publickey 14:20:13.752 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.config.keys.loader.openssh.OpenSSHKeyPairResourceParser - extractKeyPairs(C:\Users\qz\.ssh\id_rsa) decode 1 keys using context=OpenSSHParserContext[cipher=none, kdfOptions=none: options=] 14:20:13.806 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.auth.pubkey.UserAuthPublicKey - sendAuthDataRequest(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-512 - fingerprint=SHA256:SnWIPByHoyv45On0Qtt1PWmnaE7i0U62JlpGuh1U/Sg 14:20:13.806 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #6 sending command=50[SSH_MSG_USERAUTH_REQUEST] len=468 14:20:13.806 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 516 bytes 14:20:13.807 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) successfully processed initial buffer by method=publickey 14:20:13.808 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #6 SSH_MSG_USERAUTH_FAILURE 14:20:13.808 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientUserAuthService - processUserAuth(ClientSessionImpl[root@/10.12.105.220:22]) Received SSH_MSG_USERAUTH_FAILURE - partial=false, methods=publickey,password 14:20:13.809 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.auth.pubkey.UserAuthPublicKey - sendAuthDataRequest(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=rsa-sha2-256 - fingerprint=SHA256:SnWIPByHoyv45On0Qtt1PWmnaE7i0U62JlpGuh1U/Sg 14:20:13.809 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #7 sending command=50[SSH_MSG_USERAUTH_REQUEST] len=468 14:20:13.809 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 516 bytes 14:20:13.809 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) successfully processed initial buffer by method=publickey 14:20:13.810 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #7 SSH_MSG_USERAUTH_FAILURE 14:20:13.810 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientUserAuthService - processUserAuth(ClientSessionImpl[root@/10.12.105.220:22]) Received SSH_MSG_USERAUTH_FAILURE - partial=false, methods=publickey,password 14:20:13.810 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.auth.pubkey.UserAuthPublicKey - sendAuthDataRequest(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST request publickey type=ssh-rsa - fingerprint=SHA256:SnWIPByHoyv45On0Qtt1PWmnaE7i0U62JlpGuh1U/Sg 14:20:13.810 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #8 sending command=50[SSH_MSG_USERAUTH_REQUEST] len=463 14:20:13.810 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 516 bytes 14:20:13.811 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) successfully processed initial buffer by method=publickey 14:20:13.812 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #8 SSH_MSG_USERAUTH_FAILURE 14:20:13.812 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientUserAuthService - processUserAuth(ClientSessionImpl[root@/10.12.105.220:22]) Received SSH_MSG_USERAUTH_FAILURE - partial=false, methods=publickey,password 14:20:13.813 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.config.keys.DefaultClientIdentitiesWatcher - loadKeys(C:\Users\qz\.ssh\id_dsa) no key loaded 14:20:13.813 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.config.keys.DefaultClientIdentitiesWatcher - loadKeys(C:\Users\qz\.ssh\id_ecdsa) no key loaded 14:20:13.813 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.config.keys.DefaultClientIdentitiesWatcher - loadKeys(C:\Users\qz\.ssh\id_ed25519) no key loaded 14:20:13.814 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.auth.pubkey.UserAuthPublicKey - resolveAttemptedPublicKeyIdentity(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] no more keys to send 14:20:13.815 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) no initial request sent by method=publickey 14:20:13.815 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.auth.pubkey.UserAuthPublicKey - destroy(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] 14:20:13.816 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) attempting method=password 14:20:13.818 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.auth.password.UserAuthPassword - sendPassword(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] send SSH_MSG_USERAUTH_REQUEST for password - modified=false 14:20:13.818 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #9 sending command=50[SSH_MSG_USERAUTH_REQUEST] len=50 14:20:13.819 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 100 bytes 14:20:13.819 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientUserAuthService - tryNext(ClientSessionImpl[root@/10.12.105.220:22]) successfully processed initial buffer by method=password 14:20:13.829 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #9 SSH_MSG_USERAUTH_SUCCESS 14:20:13.829 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientUserAuthService - processUserAuth(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_USERAUTH_SUCCESS Succeeded with password 14:20:13.829 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.auth.password.UserAuthPassword - destroy(ClientSessionImpl[root@/10.12.105.220:22])[ssh-connection] 14:20:13.829 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientConnectionService - stopHeartBeat(ClientSessionImpl[root@/10.12.105.220:22]) no heartbeat to stop 14:20:13.829 [sshd-SshClient[f0020b1]-nio2-thread-2] DEBUG org.apache.sshd.client.session.ClientConnectionService - startHeartbeat(ClientSessionImpl[root@/10.12.105.220:22]) heartbeat type=NONE, interval=PT0S 14:20:13.869 [main] DEBUG org.apache.sshd.client.channel.ChannelShell - init() service=ClientConnectionService[ClientSessionImpl[root@/10.12.105.220:22]] session=ClientSessionImpl[root@/10.12.105.220:22] id=0 14:20:13.870 [main] DEBUG org.apache.sshd.common.channel.LocalWindow - init(LocalWindow[client](ChannelShell[id=0, recipient=-1]-ClientSessionImpl[root@/10.12.105.220:22])) size=2097152, max=2097152, packet=32768 14:20:13.870 [main] DEBUG org.apache.sshd.client.session.ClientConnectionService - registerChannel(ClientConnectionService[ClientSessionImpl[root@/10.12.105.220:22]])[id=0, registered=true] ChannelShell[id=0, recipient=-1]-ClientSessionImpl[root@/10.12.105.220:22] 14:20:13.870 [main] DEBUG org.apache.sshd.client.session.ClientSessionImpl - createShellChannel(ClientSessionImpl[root@/10.12.105.220:22]) created id=0 - PTY=null ******************************************************************************** * * * Connect and Authenticate successfully * * * ******************************************************************************** 14:20:13.871 [main] DEBUG org.apache.sshd.client.channel.ChannelShell - open(ChannelShell[id=0, recipient=-1]-ClientSessionImpl[root@/10.12.105.220:22]) Send SSH_MSG_CHANNEL_OPEN - type=session 14:20:13.872 [main] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #10 sending command=90[SSH_MSG_CHANNEL_OPEN] len=24 14:20:13.872 [main] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 68 bytes 14:20:13.875 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #10 SSH_MSG_CHANNEL_OPEN_CONFIRMATION 14:20:13.875 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientConnectionService - channelOpenConfirmation(ChannelShell[id=0, recipient=-1]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_OPEN_CONFIRMATION sender=0, window-size=0, packet-size=32768 14:20:13.875 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.channel.ChannelShell - setRecipient(ChannelShell[id=0, recipient=-1]-ClientSessionImpl[root@/10.12.105.220:22]) recipient=0 14:20:13.877 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.channel.RemoteWindow - init(RemoteWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22])) size=0, max=0, packet=32768 14:20:13.877 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.channel.ChannelShell - doOpenPty(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) Send SSH_MSG_CHANNEL_REQUEST pty-req: PtyChannelConfiguration[type=dummy, lines=24, columns=80, height=480, width=640, modes={ISIG=1, ICANON=1, ECHO=1, ECHOE=1, ECHOK=1, ECHONL=0, NOFLSH=0}] 14:20:13.878 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #11 sending command=98[SSH_MSG_CHANNEL_REQUEST] len=82 14:20:13.879 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 132 bytes 14:20:13.882 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.channel.ChannelShell - doOpen(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) send SSH_MSG_CHANNEL_REQUEST shell 14:20:13.882 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #12 sending command=98[SSH_MSG_CHANNEL_REQUEST] len=15 14:20:13.883 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 68 bytes 14:20:13.920 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #11 SSH_MSG_CHANNEL_WINDOW_ADJUST 14:20:13.920 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.channel.ChannelShell - handleWindowAdjust(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_WINDOW_ADJUST window=131072 14:20:13.920 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.common.channel.RemoteWindow - expand(RemoteWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22])) increase window from 0 by 131072 up to 131072 14:20:13.921 [sshd-SshClient[f0020b1]-nio2-thread-9] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #12 SSH_MSG_CHANNEL_DATA 14:20:13.921 [sshd-SshClient[f0020b1]-nio2-thread-9] DEBUG org.apache.sshd.common.channel.LocalWindow - Consume LocalWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) by 55 down to 2097097 14:20:13.921 [sshd-SshClient[f0020b1]-nio2-thread-9] DEBUG org.apache.sshd.client.channel.ChannelShell - handleData(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_DATA len=55 Last login: Tue Mar 25 23:53:49 2025 from 10.14.1.72 14:20:13.941 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #13 SSH_MSG_CHANNEL_DATA 14:20:13.941 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.common.channel.LocalWindow - Consume LocalWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) by 20 down to 2097077 14:20:13.941 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.channel.ChannelShell - handleData(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_DATA len=20 [root@localhost ~]# 14:20:18.946 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #14 SSH_MSG_CHANNEL_REQUEST 14:20:18.947 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.channel.ChannelShell - handleChannelRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_REQUEST keepal...@openssh.com wantReply=true 14:20:18.948 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.channel.ChannelShell - handleInternalRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22])[want-reply=true] received keep-alive: keepal...@openssh.com 14:20:18.948 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.channel.ChannelShell - sendResponse(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) request=keepal...@openssh.com result=ReplySuccess, want-reply=true 14:20:18.948 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #13 sending command=99[SSH_MSG_CHANNEL_SUCCESS] len=5 14:20:18.948 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 52 bytes 14:20:18.949 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #15 SSH_MSG_UNIMPLEMENTED 14:20:18.950 [sshd-SshClient[f0020b1]-nio2-thread-3] DEBUG org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter - handleUnimplementedMessage(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_UNIMPLEMENTED - seqNo=13 14:20:23.955 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #16 SSH_MSG_CHANNEL_REQUEST 14:20:23.955 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.client.channel.ChannelShell - handleChannelRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_REQUEST keepal...@openssh.com wantReply=true 14:20:23.955 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.client.channel.ChannelShell - handleInternalRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22])[want-reply=true] received keep-alive: keepal...@openssh.com 14:20:23.956 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.client.channel.ChannelShell - sendResponse(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) request=keepal...@openssh.com result=ReplySuccess, want-reply=true 14:20:23.956 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #14 sending command=99[SSH_MSG_CHANNEL_SUCCESS] len=5 14:20:23.956 [sshd-SshClient[f0020b1]-nio2-thread-6] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 52 bytes 14:20:23.957 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #17 SSH_MSG_UNIMPLEMENTED 14:20:23.957 [sshd-SshClient[f0020b1]-nio2-thread-4] DEBUG org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter - handleUnimplementedMessage(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_UNIMPLEMENTED - seqNo=14 14:20:28.961 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #18 SSH_MSG_CHANNEL_REQUEST 14:20:28.961 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.channel.ChannelShell - handleChannelRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_CHANNEL_REQUEST keepal...@openssh.com wantReply=true 14:20:28.962 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.channel.ChannelShell - handleInternalRequest(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22])[want-reply=true] received keep-alive: keepal...@openssh.com 14:20:28.962 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.channel.ChannelShell - sendResponse(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) request=keepal...@openssh.com result=ReplySuccess, want-reply=true 14:20:28.962 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.client.session.ClientSessionImpl - encode(ClientSessionImpl[root@/10.12.105.220:22]) packet #15 sending command=99[SSH_MSG_CHANNEL_SUCCESS] len=5 14:20:28.962 [sshd-SshClient[f0020b1]-nio2-thread-5] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - writeBuffer(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) writing 52 bytes 14:20:28.963 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.client.session.ClientSessionImpl - doHandleMessage(ClientSessionImpl[root@/10.12.105.220:22]) process #19 SSH_MSG_UNIMPLEMENTED 14:20:28.963 [sshd-SshClient[f0020b1]-nio2-thread-1] DEBUG org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter - handleUnimplementedMessage(ClientSessionImpl[root@/10.12.105.220:22]) SSH_MSG_UNIMPLEMENTED - seqNo=15 14:20:33.969 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - handleReadCycleCompletion(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) Socket has been disconnected (result=-1), closing IoSession now 14:20:33.970 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - close(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) Closing immediately 14:20:33.970 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - doCloseImmediately(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) closing socket=sun.nio.ch.WindowsAsynchronousSocketChannelImpl[connected local=/0:0:0:0:0:0:0:0:51929 remote=/10.12.105.220:22] 14:20:33.970 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Session - doCloseImmediately(Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22]) socket=sun.nio.ch.WindowsAsynchronousSocketChannelImpl[closed] closed 14:20:33.970 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.io.nio2.Nio2Connector - unmapSession(id=101): Nio2Session[local=/0:0:0:0:0:0:0:0:51929, remote=/10.12.105.220:22] 14:20:33.970 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - close(ClientSessionImpl[root@/10.12.105.220:22]) Closing immediately 14:20:33.971 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientSessionImpl - signalAuthFailure(ClientSessionImpl[root@/10.12.105.220:22]) type=SshException, signalled=false, first=false: Session is being closed 14:20:33.972 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.session.helpers.SessionTimeoutListener - sessionClosed(ClientSessionImpl[root@/10.12.105.220:22]) un-tracked 14:20:33.976 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientConnectionService - close(ClientConnectionService[ClientSessionImpl[root@/10.12.105.220:22]]) Closing immediately 14:20:33.976 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.session.ClientConnectionService - stopHeartBeat(ClientSessionImpl[root@/10.12.105.220:22]) no heartbeat to stop 14:20:33.976 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.channel.ChannelShell - close(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) Closing immediately 14:20:33.977 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.client.channel.ChannelShell - close(ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) no EOF sent 14:20:33.977 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.channel.LocalWindow - Closing LocalWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) 14:20:33.977 [sshd-SshClient[f0020b1]-nio2-thread-7] DEBUG org.apache.sshd.common.channel.RemoteWindow - Closing RemoteWindow[client](ChannelShell[id=0, recipient=0]-ClientSessionImpl[root@/10.12.105.220:22]) ``` Server log ``` Mar 26 14:19:51 localhost sshd[20892]: Accepted password for root from 10.14.1.72 port 51929 ssh2 Mar 26 14:19:56 localhost sshd[20892]: dispatch_protocol_error: type 99 seq 13 Mar 26 14:20:01 localhost sshd[20892]: dispatch_protocol_error: type 99 seq 14 Mar 26 14:20:06 localhost sshd[20892]: dispatch_protocol_error: type 99 seq 15 Mar 26 14:20:11 localhost sshd[20892]: Timeout, client not responding. ``` Here is my code package sshTools.sshTool; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintStream; import java.nio.charset.StandardCharsets; import java.util.Objects; import org.apache.sshd.client.SshClient; import org.apache.sshd.client.channel.ChannelShell; import org.apache.sshd.client.session.ClientSession; public class SshClientTool2 { private static PrintStream ps; static { try { ps = (PrintStream) System.class.getDeclaredField("out").get(null); } catch (Exception ignore) { // ignore } } public static void main(String[] args) throws IOException, InterruptedException { SshClient client = SshClient.setUpDefaultClient(); ClientSession session = null; ChannelShell channelShell = null; try { session = createConnect(args, client); channelShell = session.createShellChannel(); printMsg("********************************************************************************\n"); printMsg("* *\n"); printMsg("* Connect and Authenticate successfully *\n"); printMsg("* *\n"); printMsg("********************************************************************************\n"); ShtermOutputStream shtermOutputStream = new ShtermOutputStream(); channelShell.setOut(shtermOutputStream); channelShell.open().verify(); Thread inputThread = startInputThread(channelShell.getInvertedIn()); inputThread.join(); } finally { Objects.requireNonNull(channelShell).close(false); Objects.requireNonNull(session).close(); client.close(); } } private static ClientSession createConnect(String[] args, SshClient client) throws IOException { client.start(); ClientSession session = client.connect("root", "10.12.105.220", 22) .verify(30000L).getSession(); session.addPasswordIdentity("huanghr"); session.auth().verify(30000L); return session; } private static Thread startInputThread(OutputStream outputStream) { Thread inputThread = new Thread(() -> { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { char[] buffer = new char[1024]; int numChars; StringBuilder commandBuilder = new StringBuilder(); while ((numChars = reader.read(buffer)) != -1) { for (int i = 0; i < numChars; i++) { char currentChar = buffer[i]; if (currentChar == '\n' || currentChar == '\r') { String command = commandBuilder.toString(); outputStream.write(command.getBytes(StandardCharsets.UTF_8)); outputStream.write("\r\n".getBytes()); outputStream.flush(); commandBuilder.setLength(0); } else { commandBuilder.append(currentChar); } } } } catch (IOException e) { e.printStackTrace(); } }); inputThread.start(); return inputThread; } private static void printMsg(String msg) { ps.print(msg); } } I have noticed that if I use ssh-vvv root@10.12.105.220 on centos7 to access the same device I will have no problem. The command output is as follows ``` debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype keepal...@openssh.com reply 1 debug3: send packet: type 100 ``` Is this issue related to https://github.com/apache/mina-sshd/pull/492 ? I think OpenSSH 4.5p1 server mishandles SSH_MSG_CHANNEL_SUCCESS for keepal...@openssh.com. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org