红联Linux门户
Linux帮助

linux通过putty,SSH连接远程服务器

发布时间:2016-11-26 10:54:11来源:linux网站作者:沐浴星光的少年
对于新手来说,真是花了我不少时间,先装jdk,后装tomcat,然后用putty连不通,网友说关闭防火墙,我windows防火墙是关着的,然后去关虚拟机的防火墙,linux操作任何东西都需要某些东西的软件,linux的版本不同,下载安装软件的命令也不一样,麻烦了,搜索过好多次,我Ubuntu16.04结果误入歧途去安装yum,完事了我还去配置yum源,找.repo这个文件和配置,结果怎么配,运行yum的时候都会报错,直接用***apt-get install ssh***下载就行了
连接成功后putty就可以连接远程服务器了,然后我再用ssh登陆录远程服务器,结果当然是连接不成功:
server responded "algorithm negotiation failed”
 
网上资料:
修改ssh的配置文件 /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,umac-64@openssh.com,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,curve25519-sha256@libssh.org
linux通过putty,SSH连接远程服务器
注:这个文件是要用root权限修改才能保存的:sudo vim sshd_config
linux通过putty,SSH连接远程服务器
putty和ssh都可以连接到本地虚拟机中的服务器了,以后可以随便玩咯。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26348.html