解決辦法1:在用戶配置目錄下添加一個ssh配置文件vim
vim /root/.ssh/config 內容以下:ssh
Host *
KexAlgorithms +diffie-hellman-group1-sha1
解決方法2: 在ssh全局配置目錄下添加一個ssh配置文件spa
vim /etc/ssh/ssh_config.d/ssh_xx.conf 內容以下:code
Host *
KexAlgorithms +diffie-hellman-group1-sha1
特別注意:
blog
~/.ssh/config文件的權限,不能設置爲777, 不然仍會報上述錯誤,設置爲660是OK的。it