使用远程工具SSH Secure连接ubuntu时遇到问题“ server responded “algorithm negotiation failed”“解决办法!

我使用的是ubuntu server 20,在使用远程连接工具SSH Secure连接ubuntu时报出错误“server responded "algorithm negotiation failed”,
使用远程工具SSH Secure连接ubuntu时遇到问题“ server responded “algorithm negotiation failed”“解决办法!

在网上搜了这个问题,发现解决方式都是输入命令
sudo vim /etc/ssh/sshd_config
在这个文件末尾添加
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96 KexAlgorithms 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,[email protected]
然后输入命令
sudo /etc/init.d/ssh restart
重启ssh,但是,我按照步骤这样做,重启ssh时,就会报错
使用远程工具SSH Secure连接ubuntu时遇到问题“ server responded “algorithm negotiation failed”“解决办法!
说明这样做不适合我所遇到的问题。经过摸索之后,用以下方法就可解决远程连接出错问题,所以在这做个记录。
同样输入命令,
sudo vim /etc/ssh/sshd_config
进入sshd_config
将PermitRootLogin前面的“#”去掉,并且后面改成“yes”
使用远程工具SSH Secure连接ubuntu时遇到问题“ server responded “algorithm negotiation failed”“解决办法!

在sshd_config文件后面输入以下内容(注意:对于不太了解linux命令的同学来说,可能不太懂vim,这里输入以下内容时,要先按‘i’,才可以输入内容)
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc
MACs hmac-md5,hmac-sha1,[email protected]
KexAlgorithms 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,[email protected]
输入完之后,按“ESC”再按“ :wq ”,退出编辑页面,在输入命令
sudo /etc/init.d/ssh restart重启ssh.
使用远程工具SSH Secure连接ubuntu时遇到问题“ server responded “algorithm negotiation failed”“解决办法!
重启成功之后,使用远程连接工具便可以连接成功。