问题:ssh登录主机报错
ssh root@172.222.222.243
报错
#报错
Unable to negotiate with 172.222.222.243 port 22: no matching key exchange method found. Their offer: ecdh-sha2-nistp256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp384,ecdh-sha2-nistp521
解决
方案1:
临时解决
ssh增加参数
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@172.222.222.243
永久解决
家目录ssh配置文件增加配置
vim $HOME/.ssh/config
KexAlgorithms +diffie-hellman-group1-sha1
备注
PubkeyAcceptedKeyTypes +ssh-rsa
Host 172.222.222.243
KexAlgorithms +diffie-hellman-group1-sha1