Xshell通过ssh连接设备失败问题记录(Xshell设置问题)

问题现象:通过Xshell ssh连接设备,连接失败,经确认设备ssh配置没问题,PC通过其它终端软件可以ssh登录设备只有Xshell不可以。

处理过程:开启Xshell 记录日志功能

Xshell通过ssh连接设备失败问题记录(Xshell设置问题)_第1张图片

 连接信息如下

Connecting to xx.9.0.95:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
[09:35:53] Version exchange initiated...
[09:35:53]     server: SSH-1.99--
[09:35:53]     client: SSH-2.0-nsssh2_7.0.0024 NetSarang Computer, Inc.
[09:35:53]     SSH2 is selected.
[09:35:53]     SSH_MSG_IGNORE(2)
[09:35:53]         Outgoing packet:  20 (0x14: SSH2_MSG_KEXINIT)
[09:35:53]         Incoming packet:  20 (0x14: SSH2_MSG_KEXINIT)
[09:35:53] Algorithm negotiation initiated... (Prompt mode)
[09:35:53]     key exchange: diffie-hellman-group-exchange-sha1
[09:35:53]     host key: ssh-rsa
[09:35:53]     outgoing encryption: aes128-ctr
[09:35:53]     incoming encryption: aes128-ctr
[09:35:53]     outgoing mac: hmac-sha2-256
[09:35:53]     incoming mac: hmac-sha2-256
[09:35:53]     outgoing compression: none
[09:35:53]     incoming compression: none
[09:35:53]         Outgoing packet:  34 (0x22: SSH2_MSG_KEX_DH_GEX_REQUEST)
[09:35:53]         Incoming packet:  31 (0x1f: SSH2_MSG_KEXDH_REPLY)
[09:35:53]         Outgoing packet:  32 (0x20: SSH2_MSG_KEX_DH_GEX_INIT)
[09:35:53]         Incoming packet:  33 (0x21: SSH2_MSG_KEX_DH_GEX_REPLY)
[09:35:53] Host authentication initiated...
[09:35:53]     Hostkey fingerprint:
[09:35:53]     rsa 3072 90:c5:88:c0:99:b1:4f:f2:23:6d:fd:1d:b3:a6:b8:1e
[09:35:53]     Host Key Verified.
[09:35:53]         Outgoing packet:  21 (0x15: SSH2_MSG_NEWKEYS)
[09:35:53]         Incoming packet:  21 (0x15: SSH2_MSG_NEWKEYS)
[09:35:53]         Outgoing packet:   5 (0x05: SSH2_MSG_SERVICE_REQUEST)
[09:35:53]         Incoming packet:   6 (0x06: SSH2_MSG_SERVICE_ACCEPT)
[09:35:53] User authentication initiated... (Prompt mode)
[09:35:53]     Sent user name 'caoyang'.
[09:35:53]         Outgoing packet:  50 (0x32: SSH2_MSG_USERAUTH_REQUEST)
[09:35:53]         Incoming packet:  53 (0x35: SSH2_MSG_USERAUTH_BANNER)
[09:35:53]     Received Banner.

*******************************************************************

            WARNING  - Authorized Users Only !!!

  Access to this system is PROHIBITED unless AUTHORISED
  Be aware of the system is the property of BANK OF JINZHOU
  Any attempt for unauthorized access will be logged
  and appropriate legal action will be taken.
  DISCONNECT IMMEDIATELY if you are not AUTHORISED

*******************************************************************
[09:35:53]         Incoming packet:  51 (0x33: SSH2_MSG_USERAUTH_FAILURE)
[09:35:53]     Password auth...
[09:35:53]         Outgoing packet:  50 (0x32: SSH2_MSG_USERAUTH_REQUEST)
[09:35:53]     Sent password.
[09:35:53]         Incoming packet:  53 (0x35: SSH2_MSG_USERAUTH_BANNER)
[09:35:53]     Failed to auth password.
[09:35:53]         Outgoing packet:   1 (0x01: SSH2_MSG_DISCONNECT)
Connection closing...Socket close.

Connection closed by foreign host.

Disconnected from remote host(xxx-CE6881X-01) at 09:35:53.

经确认,Xshell输入的密码也是对的。

个人分析问题应该还是出在Xshell上

1、近期进行过软件的更新,卸载重新安装未解决,

2、去官网下载最新的版本安装也没有解决。

3、后来想起来在很久之前改过Xshell的一个设置,如下:

在工具下拉菜单栏,选择“选项”打开选项对话框,“SSH认证的用户界面”为“总是基于终端”,之前默认是“总是基于对话框的”改回来后,再次连接正常。

 Xshell通过ssh连接设备失败问题记录(Xshell设置问题)_第2张图片

Xshell通过ssh连接设备失败问题记录(Xshell设置问题)_第3张图片

这个功能就是在未设置连接账号密码的时候,是否弹出对话框进行输入交互。

你可能感兴趣的:(p2p,linq,网络协议)