window下SSH连接ubuntu失败
2017-09-17 16:31
260 查看
问题1、连接ssh,在连接前记得在window下安装SSH Secure Shell Client客户端
操作步骤如下:
在win7下通过ssh连接虚拟机的ubuntu,连接失败,提示信息见下图:
![](http://images.cnitblog.com/blog/270324/201306/21144342-31fb0126abd346779a496d4874f5a0b2.jpg)
然后我在ubuntu终端下输入:ssh localhost,见下图:
![](http://images.cnitblog.com/blog/270324/201306/21144355-e1be2f4f8dde44918e17a2f0aaca0ae9.jpg)
ssh : connect to host localhost port 22: Connection refused,原来没有装sshd,也就是openssh-server。
输入命令: sudo apt-get install openssh-server
然后输入命令:ssh localhost,见下图
![](http://images.cnitblog.com/blog/270324/201306/21144401-db9cb7db9d7147f4a2d856be6c154a9e.jpg)
此时可以通过ssh工具连虚拟机的ubuntu系统了。
问题2.SSH Secure Shell 无法登录:server responded "algorithm negotiation failed”
![](https://img-blog.csdn.net/20170917164825703?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvanVsaWVsZWxl/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
修改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
重启sshd服务后,即可正常连接。
sudo service ssh restart
操作步骤如下:
在win7下通过ssh连接虚拟机的ubuntu,连接失败,提示信息见下图:
![](http://images.cnitblog.com/blog/270324/201306/21144342-31fb0126abd346779a496d4874f5a0b2.jpg)
然后我在ubuntu终端下输入:ssh localhost,见下图:
![](http://images.cnitblog.com/blog/270324/201306/21144355-e1be2f4f8dde44918e17a2f0aaca0ae9.jpg)
ssh : connect to host localhost port 22: Connection refused,原来没有装sshd,也就是openssh-server。
输入命令: sudo apt-get install openssh-server
然后输入命令:ssh localhost,见下图
![](http://images.cnitblog.com/blog/270324/201306/21144401-db9cb7db9d7147f4a2d856be6c154a9e.jpg)
此时可以通过ssh工具连虚拟机的ubuntu系统了。
问题2.SSH Secure Shell 无法登录: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
重启sshd服务后,即可正常连接。
sudo service ssh restart
相关文章推荐
- window用ssh连接本机虚拟机中的ubuntu
- window用ssh连接本机虚拟机NAT方式中的ubuntu
- SSH连接Ubuntu虚拟机失败:The remote system refused connection
- ubuntu学习1——window通过ssh连接ubuntu
- window用ssh连接本机虚拟机中的ubuntu
- SSH连接Ubuntu虚拟机失败
- window(mobo/xshell) 通过ssh连接Ubuntu16.04
- ubuntu ssh远程连接失败问题
- window用ssh连接本机虚拟机中的ubuntu
- 关于Ubuntu远程ssh连接失败的问题
- window用ssh连接本机虚拟机中的ubuntu
- window用 xshell ssh 连接 ubuntu16.04
- Ubuntu终端ssh连接服务器慢的解决方法
- ssh远程连接Ubuntu
- window下ssh客户端连接linux服务器:
- ubuntu开启ssh服务让crt能远程通过22端口连接系统
- 远程连接linux(Ubuntu配置SSH服务)22端口
- Ubuntu下Mongodb数据库连接失败问题
- SSH连接失败,报错Host key verification failed——原理和解决方法