赞
踩
某次xshell远程登录某台云主机,报错如下:找不到匹配的hot key算法
现场版本:Openssh 9.3,xshell:Xshell.exe: 5.0.0032, nssock2.dll: 5.0.0020, nsssh3.dll: 5.0.0026,
1)连不上后的报错:
2)用其他linux主机验证登录目标主机,看是否正常
使用OpenSSH_7.4p1作为客户端测试正常;
如果不行,用以下命令测试:
ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa user@host -p 122
在SSH协议中,“SSH-rsa”签名方案使用SHA-1哈希算法和rsa公钥算法。OpenSSH将在不久的将来默认禁用此签名方案。请注意,停用“ssh-rsa”签名并不一定需要停止使用rsa密钥。在SSH协议中,密钥可能能够使用多种算法进行签名。特别是,“ssh-rsa”密钥能够使用“rsa-sha2-256”(rsa/SHA256)、“rsa-sa2-512”(rsa/CHA512)和“ssh-rsa”(rsa/SHA1)进行签名。默认情况下,只有最后一个处于关闭状态。>=8.2p1 版的 openssh 的 ssh 客户端默认禁用了 ssh-rsa 算法。 对于7.0,基于安全考虑,OpenSSH7.0将diffie-hellman-group1-sha1,ssh-dss等运行时状态默认变更为禁用。更多参看openssh
3)可查询你本地电脑的主机秘钥保存目录,清理旧的后重新连接尝试
现场版本的目录是在%Documents%\NetSarang\SECSH\UserKeys 这个目录下:C:\Users\Administrator\Documents\NetSarang\SECSH
4)linux本地创建客户端配置文件指定连接会话协商算法
vi ~/.ssh/config #配置
Host old-host或*
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
更换高版本xshell:5.0.0052(Build 1255)
调试登录显示如下:
Connection established.
To escape to local shell, press ‘Ctrl+Alt+]’.
[14:44:19] Version exchange initiated…
[14:44:19] server: SSH-2.0-OpenSSH_9.3
[14:44:19] client: SSH-2.0-nsssh2_5.0.0045 NetSarang Computer, Inc.
[14:44:19] SSH2 is selected.
[14:44:19] Algorithm negotiation initiated… (Dialog mode)
[14:44:19] key exchange: diffie-hellman-group-exchange-sha256
[14:44:19] host key: ecdsa-sha2-nistp256
[14:44:19] outgoing encryption: aes256-ctr
[14:44:19] incoming encryption: aes256-ctr
[14:44:19] outgoing mac: hmac-sha1
[14:44:19] incoming mac: hmac-sha1
[14:44:19] outgoing compression: none
[14:44:19] incoming compression: none
[14:44:20] Host authentication initiated…
[14:44:20] Hostkey fingerprint:
[14:44:20] ssh-ecdsa ……
[14:44:20] Accepted. Verifying host key…
[14:44:20] Verified.
[14:44:20] User authentication initiated… (Dialog mode)
[14:44:20] Sent user name ‘root’.
You have logged onto a secured server…All accesses logged
[14:44:20] Sent password.
[14:44:20] Access granted.
综上,遇到这种问题,Windows的话还是升级xshell吧!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。