kingToolbox / WindTerm

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

ssh 无法链接华为交换机、路由器 #375

Open ML1700 opened 2 years ago

ML1700 commented 2 years ago

ssh 无法链接华为交换机、路由器 用Xshell可以 MobaXterm也可以

bestv5 commented 2 years ago

提供版本 提示错误,最好有截图啥的。不要让人猜。😄

ML1700 commented 2 years ago

版本是 Snipaste_2021-12-17_11-28-18 用Xshell正常 Snipaste_2021-12-17_11-25-01 用WindTerm链接直接卡死,过一会出现,会话已断开连接 Snipaste_2021-12-17_11-27-30 Snipaste_2021-12-17_11-27-20

LitCcc commented 2 years ago

https://github.com/kingToolbox/WindTerm/issues/325

ML1700 commented 2 years ago

发个日志,大家看看是什么情况? [2021-12-17 20:09:24] ssh_socket_connect: Nonblocking connection socket: 4724 [2021-12-17 20:09:24] ssh_connect: Socket connecting, now waiting for the callbacks to work [2021-12-17 20:09:24] ssh_connect: Actual timeout : 10000 [2021-12-17 20:09:24] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLOUT ), out buffer 0 [2021-12-17 20:09:24] ssh_socket_pollcallback: Received POLLOUT in connecting state [2021-12-17 20:09:24] socket_callback_connected: Socket connection callback: 1 (0) [2021-12-17 20:09:24] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2021-12-17 20:09:24] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLOUT ), out buffer 0 [2021-12-17 20:09:24] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLIN ), out buffer 0 [2021-12-17 20:09:24] callback_receive_banner: Received banner: SSH-2.0-- [2021-12-17 20:09:24] ssh_client_connection_callback: SSH server banner: SSH-2.0-- [2021-12-17 20:09:24] ssh_analyze_banner: Analyzing banner: SSH-2.0-- [2021-12-17 20:09:24] 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" [2021-12-17 20:09:24] ssh_known_hosts_read_entries: Failed to open the known_hosts file 'C:/Users/Administrator/Desktop/WindTerm_2.2.2/profiles/default.v10/terminal/ssh//known_hosts': No such file or directory [2021-12-17 20:09:24] ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory [2021-12-17 20:09:24] 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" [2021-12-17 20:09:24] ssh_list_kex: kex algos: 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-sha256,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c [2021-12-17 20:09:24] 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 [2021-12-17 20:09:24] ssh_list_kex: encryption client->server: aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc [2021-12-17 20:09:24] 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 [2021-12-17 20:09:24] 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 [2021-12-17 20:09:24] 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 [2021-12-17 20:09:24] ssh_list_kex: compression algo client->server: none [2021-12-17 20:09:24] ssh_list_kex: compression algo server->client: none [2021-12-17 20:09:24] ssh_list_kex: languages client->server: [2021-12-17 20:09:24] ssh_list_kex: languages server->client: [2021-12-17 20:09:24] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2021-12-17 20:09:24] packet_send2: packet: wrote [type=20, len=1084, padding_size=8, comp=1075, payload=1075] [2021-12-17 20:09:24] ssh_send_kex: SSH_MSG_KEXINIT sent [2021-12-17 20:09:24] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLOUT ), out buffer 0 [2021-12-17 20:09:24] ssh_socket_pollcallback: sending control flow event [2021-12-17 20:09:24] ssh_packet_socket_controlflow_callback: sending channel_write_wontblock callback [2021-12-17 20:09:24] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLIN ), out buffer 0 [2021-12-17 20:09:24] ssh_packet_socket_callback: packet: read type 20 [len=380,padding=7,comp=372,payload=372] [2021-12-17 20:09:24] ssh_packet_process: Dispatching handler for packet type 20 [2021-12-17 20:09:24] 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 [2021-12-17 20:09:24] ssh_list_kex: server host key algo: ecdsa-sha2-nistp521,ssh-dss,ssh-rsa [2021-12-17 20:09:24] ssh_list_kex: encryption client->server: aes256-ctr,aes128-ctr [2021-12-17 20:09:24] ssh_list_kex: encryption server->client: aes256-ctr,aes128-ctr [2021-12-17 20:09:24] ssh_list_kex: mac algo client->server: hmac-sha2-256 [2021-12-17 20:09:24] ssh_list_kex: mac algo server->client: hmac-sha2-256 [2021-12-17 20:09:24] ssh_list_kex: compression algo client->server: none,zlib [2021-12-17 20:09:24] ssh_list_kex: compression algo server->client: none,zlib [2021-12-17 20:09:24] ssh_list_kex: languages client->server: [2021-12-17 20:09:24] ssh_list_kex: languages server->client: [2021-12-17 20:09:24] ssh_kex_select_methods: Negotiated diffie-hellman-group16-sha512,ecdsa-sha2-nistp521,aes256-ctr,aes256-ctr,hmac-sha2-256,hmac-sha2-256,none,none,, [2021-12-17 20:09:25] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2021-12-17 20:09:25] packet_send2: packet: wrote [type=30, len=524, padding_size=5, comp=518, payload=518] [2021-12-17 20:09:25] ssh_socket_pollcallback: Poll callback on socket 4724 (POLLOUT ), out buffer 0 [2021-12-17 20:09:25] ssh_socket_pollcallback: sending control flow event [2021-12-17 20:09:25] ssh_packet_socket_controlflow_callback: sending channel_write_wontblock callback [2021-12-17 20:09:34] ssh_connect: Timeout connecting to 41.1.1.1 [2021-12-17 20:09:34] ssh_connect: current state : 9 [2021-12-17 20:10:25] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2021-12-17 20:10:25] packet_send2: packet: wrote [type=1, len=28, padding_size=7, comp=20, payload=20 SSH_2021-12-17_20-09-24.log ]

hfhzzdx commented 2 years ago

楼上的已经回答了 是因为交换机没有sftp服务导致的. 试着去掉windterm的sftp服务 image

runto-lv commented 2 years ago

上面的问题原因我找到了,我了一样的问题

原因是默认的连接 超时时间为10秒,把10秒修改成100秒就可以了