kingToolbox / WindTerm

A professional cross-platform SSH/Sftp/Shell/Telnet/Serial terminal.
https://kingtoolbox.github.io
22.79k stars 1.76k forks source link

Socket error: disconnected #1384

Open daniel12370 opened 1 year ago

daniel12370 commented 1 year ago

I can login to the server with Putty, but ssh can not connect to the server with windterm.

The issue occurred on windterm 2.2.2 & 2.5 & 2.6.

The linux version as below:

Linux version 3.0.76-0.11-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990)

The error message as below:

Socket error: disconnected

ab03c398658c8ec02bd36d8e5433bd6d

The log as below:

[2022-12-01 14:29:01] ssh_connect: libssh 0.9.6 (c) 2003-2021 Aris Adamantiadis, Andreas Schneider and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_winlock [2022-12-01 14:29:01] getai: host 127.0.0.1 matches an IP address [2022-12-01 14:29:01] ssh_socket_connect: Nonblocking connection socket: 1752 [2022-12-01 14:29:01] ssh_connect: Socket connecting, now waiting for the callbacks to work [2022-12-01 14:29:01] ssh_connect: Actual timeout : 30000 [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLOUT ), out buffer 0 [2022-12-01 14:29:01] ssh_socket_pollcallback: Received POLLOUT in connecting state [2022-12-01 14:29:01] socket_callback_connected: Socket connection callback: 1 (0) [2022-12-01 14:29:01] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLOUT ), out buffer 0 [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLIN ), out buffer 0 [2022-12-01 14:29:01] callback_receive_banner: Received banner: SSH-2.0-OpenSSH_6.2 [2022-12-01 14:29:01] ssh_client_connection_callback: SSH server banner: SSH-2.0-OpenSSH_6.2 [2022-12-01 14:29:01] ssh_analyze_banner: Analyzing banner: SSH-2.0-OpenSSH_6.2 [2022-12-01 14:29:01] ssh_analyze_banner: We are talking to an OpenSSH client version: 6.2 (60200) [2022-12-01 14:29:01] ssh_client_select_hostkeys: Order of wanted host keys: "ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss" [2022-12-01 14:29:01] ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory [2022-12-01 14:29:01] ssh_client_select_hostkeys: No key found in known_hosts; changing host key method to "ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss" [2022-12-01 14:29:01] ssh_log_hexdump: session cookie (16 bytes): [2022-12-01 14:29:01] ssh_log_hexdump: 00000000 1e c2 c5 3b 62 30 85 51 7e 89 5e 46 ad 7a 45 88 ...;b0.Q~.^F.zE. [2022-12-01 14:29:01] ssh_list_kex: kex algos: diffie-hellman-group-exchange-sha256,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group18-sha512,diffie-hellman-group16-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,ext-info-c [2022-12-01 14:29:01] ssh_list_kex: server host key algo: ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss [2022-12-01 14:29:01] ssh_list_kex: encryption client->server: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc [2022-12-01 14:29:01] ssh_list_kex: encryption server->client: aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc [2022-12-01 14:29:01] ssh_list_kex: mac algo client->server: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96 [2022-12-01 14:29:01] ssh_list_kex: mac algo server->client: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96 [2022-12-01 14:29:01] ssh_list_kex: compression algo client->server: none [2022-12-01 14:29:01] ssh_list_kex: compression algo server->client: none [2022-12-01 14:29:01] ssh_list_kex: languages client->server: [2022-12-01 14:29:01] ssh_list_kex: languages server->client: [2022-12-01 14:29:01] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2022-12-01 14:29:01] packet_send2: packet: wrote [type=20, len=1148, padding_size=7, comp=1140, payload=1140] [2022-12-01 14:29:01] ssh_send_kex: SSH_MSG_KEXINIT sent [2022-12-01 14:29:01] ssh_packet_socket_callback: rcv packet cb (len=0, state=INIT) [2022-12-01 14:29:01] ssh_packet_socket_callback: Waiting for more data (0 < 8) [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLOUT ), out buffer 0 [2022-12-01 14:29:01] ssh_socket_pollcallback: sending control flow event [2022-12-01 14:29:01] ssh_packet_socket_controlflow_callback: sending channel_write_wontblock callback [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLIN ), out buffer 0 [2022-12-01 14:29:01] ssh_packet_socket_callback: rcv packet cb (len=1380, state=INIT) [2022-12-01 14:29:01] ssh_packet_socket_callback: packet: partial packet (read len) [len=1540, receivedlen=1380, to_be_read=1544] [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLIN ), out buffer 0 [2022-12-01 14:29:01] ssh_packet_socket_callback: rcv packet cb (len=1544, state=SIZE_READ) [2022-12-01 14:29:01] ssh_packet_socket_callback: packet: read type 20 [len=1540,padding=7,comp=1532,payload=1532] [2022-12-01 14:29:01] ssh_packet_incoming_filter: Filtering packet type 20 [2022-12-01 14:29:01] ssh_packet_process: Dispatching handler for packet type 20 [2022-12-01 14:29:01] ssh_log_hexdump: session cookie (16 bytes): [2022-12-01 14:29:01] ssh_log_hexdump: 00000000 a1 22 82 4b 51 49 7d 29 bc 6d 51 10 cb a2 cc b9 .".KQI}).mQ..... [2022-12-01 14:29:01] ssh_list_kex: kex algos: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [2022-12-01 14:29:01] ssh_list_kex: server host key algo: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [2022-12-01 14:29:01] ssh_list_kex: encryption client->server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [2022-12-01 14:29:01] ssh_list_kex: encryption server->client: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [2022-12-01 14:29:01] ssh_list_kex: mac algo client->server: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [2022-12-01 14:29:01] ssh_list_kex: mac algo server->client: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [2022-12-01 14:29:01] ssh_list_kex: compression algo client->server: none,zlib@openssh.com [2022-12-01 14:29:01] ssh_list_kex: compression algo server->client: none,zlib@openssh.com [2022-12-01 14:29:01] ssh_list_kex: languages client->server: [2022-12-01 14:29:01] ssh_list_kex: languages server->client: [2022-12-01 14:29:01] ssh_kex_select_methods: Negotiated diffie-hellman-group-exchange-sha256,ecdsa-sha2-nistp256,aes256-gcm@openssh.com,aes256-gcm@openssh.com,aead-gcm,aead-gcm,none,none,, [2022-12-01 14:29:01] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2022-12-01 14:29:01] packet_send2: packet: wrote [type=34, len=20, padding_size=6, comp=13, payload=13] [2022-12-01 14:29:01] ssh_packet_socket_callback: rcv packet cb (len=0, state=INIT) [2022-12-01 14:29:01] ssh_packet_socket_callback: Waiting for more data (0 < 8) [2022-12-01 14:29:01] ssh_socket_pollcallback: Poll callback on socket 1752 (POLLOUT ), out buffer 0 [2022-12-01 14:29:01] ssh_socket_exception_callback: Socket exception callback: 1 (0) [2022-12-01 14:29:01] ssh_socket_exception_callback: Socket error: disconnected [2022-12-01 14:29:01] ssh_connect: current state : 9

Is there any solution? Please help.

joeaniu commented 9 months ago

similar issue:

Windterm 2.5.0 CentOS Linux release 7.6.1810 (Core)

[2023-12-09 15:23:52] ssh_connect: libssh 0.9.6 (c) 2003-2021 Aris Adamantiadis, Andreas Schneider and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_winlock [2023-12-09 15:23:52] getai: host 127.0.0.1 matches an IP address [2023-12-09 15:23:52] ssh_socket_connect: Nonblocking connection socket: 6048 [2023-12-09 15:23:52] ssh_connect: Socket connecting, now waiting for the callbacks to work [2023-12-09 15:23:52] ssh_connect: Actual timeout : 10000 [2023-12-09 15:23:52] ssh_socket_pollcallback: Poll callback on socket 6048 (POLLOUT ), out buffer 0 [2023-12-09 15:23:52] ssh_socket_pollcallback: Received POLLOUT in connecting state [2023-12-09 15:23:52] socket_callback_connected: Socket connection callback: 1 (0) [2023-12-09 15:23:52] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2023-12-09 15:23:52] ssh_socket_pollcallback: Poll callback on socket 6048 (POLLOUT ), out buffer 0 [2023-12-09 15:23:52] ssh_socket_pollcallback: Poll callback on socket 6048 (), out buffer 0 [2023-12-09 15:23:52] ssh_socket_exception_callback: Socket exception callback: 1 (0) [2023-12-09 15:23:52] ssh_socket_exception_callback: Socket error: disconnected [2023-12-09 15:23:52] ssh_connect: current state : 9