赞
踩
登录机器时报错:Unable to negotiate with x.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
根本原因是:OpenSSH7.0以后的版本不再支持ssh-dss(DSA)算法,官方的说法是这个算法太弱了。MACOS升到10.12附带的openssh
版本是7.4,如下:➜~sshd-Vsshd:illegaloption–VOpenSSH_7
ssh -oHostKeyAlgorithms=+ssh-dss user@host -p port
ssh -oHostKeyAlgorithms=+ssh-rsa 用户名@ip地址
示例:
sftp -P 20001 -oHostKeyAlgorithms=+ssh-dss test@192.168.10.128
ssh -oHostKeyAlgorithms=+ssh-dss root@www.xxx.cn
HostKeyAlgorithms +ssh-dss
HostKeyAlgorithms ssh-rsa
PubkeyAcceptedKeyTypes ssh-rsa
参考链接:
https://www.twle.cn/t/90568
https://blog.csdn.net/u013214821/article/details/122804133
mac下使用配置文件config, SSH连接服务器:https://blog.csdn.net/Enceladuce/article/details/102372590
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。