纵有疾风起
人生不言弃

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法

今天安装了Ubuntu16.04虚拟机,与SSH连接时出现了如下问题

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

解决方法如下:

(写在前面:请先确保自己已经给Ubuntu安装了SSH服务。安装方法是在root模式下,终端输入命令apt-getinstall vim ssh)

1. 在Ubuntu终端中输入如下命令,进入配置文件

vim /etc/ssh/sshd_config

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图2Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

2. 找到如图的文本

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图3Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

将此处文本修改为下图所示(注释掉“PermitRootLogin prohibit-password”,另起一行添加“PermitRootLogin yes”)

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图4Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

3. 将光标移动到文档末尾,在文档末尾添加如下文本 

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbcMACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

如图所示:

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图5Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

4. 使用命令“ESC + : + x”退出文本编辑。然后在命令行输入命令 service ssh restart

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图6Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

5. 回到PC机,打开SSH软件,点击Quick Connect按钮,输入Ubuntu虚拟机的ip地址以及用户名(用户名一定要输入root,否则可能会导致SSH中某些操作权限不够)

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图7Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

6. 点击连接,输入密码,点击OK

Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图8Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法插图1

7. 大功告成

 

本文摘自我的CSDN博客,原文链接https://blog.csdn.net/a154299/article/details/79904620

文章转载于:https://www.cnblogs.com/UnfriendlyARM/p/9742626.html

原著是一个有趣的人,若有侵权,请通知删除

未经允许不得转载:起风网 » Ubuntu16.04连接SSH出现 Server responded “Algorithm negotiation failed” 的解决方法
分享到: 生成海报

评论 抢沙发

评论前必须登录!

立即登录