Skip to content

关于交换机无法连接的怀疑报告。(Suspect report about the inability of the switch to connect) #2076

@blog2023sunshine

Description

@blog2023sunshine

关于超时时间导致交换机无法连接的怀疑。(2.5.0版本上面已经解决)
下面是2.5.0版本的情况
当我使用华为S5735交换机 ,用putty连接的时候,从确认到出现login as: 大约需要12秒。
而使用windterm,连接交换机,每次在10秒的时候会出现timeout connecting to IP,
所以我怀疑,windterm超时时间设置太短,导致在接受到交换机回包之前已经主动断开连接,导致了无法ssh。

- 当我调整ssh - 连接 -最大连接超时 = 16秒 之后 , 正常登录到了交换机~

下列是我的连接日志: (114.114.114.114 代指交换机IP)

Doubt about timeout causing the switch to be unable to connect.

When I use the Huawei S5735 switch and connect with putty, it takes about 12 seconds from confirmation to the appearance of login as:.

When using windterm to connect to a switch, a timeout connecting to IP will appear every 10 seconds,

So I suspect that the windterm timeout was set too short, causing the connection to be actively disconnected before receiving the switch packet, resulting in the inability to ssh.

-After adjusting the SSH connection maximum connection timeout, set it to 16s,I logged in to the switch normally~

Here are my connection logs: (114.114.114.114 refers to the IP address of a switch)
My windterm versions are 2.6.0-8 (latest version) and 2.5.0, both of which are the same result

[2024-01-16 13:36:51] 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
[2024-01-16 13:36:51] getai: host 127.0.0.1 matches an IP address
[2024-01-16 13:36:51] ssh_socket_connect: Nonblocking connection socket: 2300
[2024-01-16 13:36:51] ssh_connect: Socket connecting, now waiting for the callbacks to work
[2024-01-16 13:36:51] ssh_connect: Actual timeout : 10000
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLOUT ), out buffer 0
[2024-01-16 13:36:51] ssh_socket_pollcallback: Received POLLOUT in connecting state
[2024-01-16 13:36:51] socket_callback_connected: Socket connection callback: 1 (0)
[2024-01-16 13:36:51] ssh_socket_unbuffered_write: Enabling POLLOUT for socket
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLOUT ), out buffer 0
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLIN ), out buffer 0
[2024-01-16 13:36:51] callback_receive_banner: Received banner: SSH-2.0--
[2024-01-16 13:36:51] ssh_client_connection_callback: SSH server banner: SSH-2.0--
[2024-01-16 13:36:51] ssh_analyze_banner: Analyzing banner: SSH-2.0--
[2024-01-16 13:36:51] 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"
[2024-01-16 13:36:51] ssh_known_hosts_read_entries: Failed to open the known_hosts file 'C:/Users/Administrator/Documents/WindTerm_2.6.0_Prerelease_8_Windows_Portable_x86_64/WindTerm_2.6.0/.wind/profiles/default.v10/terminal/ssh//known_hosts': No such file or directory
[2024-01-16 13:36:51] ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory
[2024-01-16 13:36:51] 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"
[2024-01-16 13:36:51] ssh_log_hexdump: session cookie (16 bytes):
[2024-01-16 13:36:51] ssh_log_hexdump: 00000000 b4 52 4a b3 6c 90 6f 41 2f 9c 22 4b e4 a9 de 69 .RJ.l.oA/."K...i
[2024-01-16 13:36:51] ssh_list_kex: kex algos: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group18-sha512,diffie-hellman-group16-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,ext-info-c
[2024-01-16 13:36:51] 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
[2024-01-16 13:36:51] ssh_list_kex: encryption client->server: [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc
[2024-01-16 13:36:51] ssh_list_kex: encryption server->client: [email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc
[2024-01-16 13:36:51] ssh_list_kex: mac algo client->server: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
[2024-01-16 13:36:51] ssh_list_kex: mac algo server->client: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
[2024-01-16 13:36:51] ssh_list_kex: compression algo client->server: none
[2024-01-16 13:36:51] ssh_list_kex: compression algo server->client: none
[2024-01-16 13:36:51] ssh_list_kex: languages client->server:
[2024-01-16 13:36:51] ssh_list_kex: languages server->client:
[2024-01-16 13:36:51] ssh_socket_unbuffered_write: Enabling POLLOUT for socket
[2024-01-16 13:36:51] packet_send2: packet: wrote [type=20, len=1148, padding_size=7, comp=1140, payload=1140]
[2024-01-16 13:36:51] ssh_send_kex: SSH_MSG_KEXINIT sent
[2024-01-16 13:36:51] ssh_packet_socket_callback: rcv packet cb (len=0, state=INIT)
[2024-01-16 13:36:51] ssh_packet_socket_callback: Waiting for more data (0 < 8)
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLOUT ), out buffer 0
[2024-01-16 13:36:51] ssh_socket_pollcallback: sending control flow event
[2024-01-16 13:36:51] ssh_packet_socket_controlflow_callback: sending channel_write_wontblock callback
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLIN ), out buffer 0
[2024-01-16 13:36:51] ssh_packet_socket_callback: rcv packet cb (len=592, state=INIT)
[2024-01-16 13:36:51] ssh_packet_socket_callback: packet: read type 20 [len=588,padding=5,comp=582,payload=582]
[2024-01-16 13:36:51] ssh_packet_incoming_filter: Filtering packet type 20
[2024-01-16 13:36:51] ssh_packet_process: Dispatching handler for packet type 20
[2024-01-16 13:36:51] ssh_log_hexdump: session cookie (16 bytes):
[2024-01-16 13:36:51] ssh_log_hexdump: 00000000 3b 07 3e 16 a9 2e d6 66 cd e5 0c 3b a7 14 ac 6e ;.>....f...;...n
[2024-01-16 13:36:51] ssh_list_kex: kex algos: diffie-hellman-group16-sha512,diffie-hellman-group15-sha512,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
[2024-01-16 13:36:51] ssh_list_kex: server host key algo: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp521,ssh-dss,ssh-rsa
[2024-01-16 13:36:51] ssh_list_kex: encryption client->server: aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc
[2024-01-16 13:36:51] ssh_list_kex: encryption server->client: aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc
[2024-01-16 13:36:51] ssh_list_kex: mac algo client->server: hmac-sha2-256,hmac-sha2-256-96,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
[2024-01-16 13:36:51] ssh_list_kex: mac algo server->client: hmac-sha2-256,hmac-sha2-256-96,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
[2024-01-16 13:36:51] ssh_list_kex: compression algo client->server: none,zlib
[2024-01-16 13:36:51] ssh_list_kex: compression algo server->client: none,zlib
[2024-01-16 13:36:51] ssh_list_kex: languages client->server:
[2024-01-16 13:36:51] ssh_list_kex: languages server->client:
[2024-01-16 13:36:51] ssh_kex_select_methods: Negotiated diffie-hellman-group16-sha512,ecdsa-sha2-nistp521,aes256-ctr,aes256-ctr,hmac-sha2-256,hmac-sha2-256,none,none,,
[2024-01-16 13:36:51] ssh_make_bignum_string: 4095 bits, 512 bytes, 0 padding

[2024-01-16 13:36:51] ssh_socket_unbuffered_write: Enabling POLLOUT for socket
[2024-01-16 13:36:51] packet_send2: packet: wrote [type=30, len=524, padding_size=6, comp=517, payload=517]
[2024-01-16 13:36:51] ssh_packet_socket_callback: rcv packet cb (len=0, state=INIT)
[2024-01-16 13:36:51] ssh_packet_socket_callback: Waiting for more data (0 < 8)
[2024-01-16 13:36:51] ssh_socket_pollcallback: Poll callback on socket 2300 (POLLOUT ), out buffer 0
[2024-01-16 13:36:51] ssh_socket_pollcallback: sending control flow event
[2024-01-16 13:36:51] ssh_packet_socket_controlflow_callback: sending channel_write_wontblock callback
[2024-01-16 13:37:01] ssh_connect: Timeout connecting to 114.114.114.114
[2024-01-16 13:37:01] ssh_connect: current state : 9
[2024-01-16 13:37:01] ssh_socket_unbuffered_write: Enabling POLLOUT for socket
[2024-01-16 13:37:01] packet_send2: packet: wrote [type=1, len=28, padding_size=7, comp=20, payload=20]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions