您的位置:首页 > 运维架构 > Shell

【Ubuntu】Xshell无法连接Vmare下安装的Ubuntu12.04的解决方案

2016-11-30 00:00 597 查看
在Vmare下安装了Ubuntu12.04,发现无法用xshell进行连接,通过查询资料,发现是Ubuntu没有安装ssh,

xshell无法连接VMare下的Ubuntu:

[c:\~]$

Connecting to 192.168.108.135:22...
Could not connect to '192.168.108.135' (port 22): Connection failed.

Type `help' to learn how to use Xshell prompt.


验证Ubuntu是否安装了ssh服务:

ubuntu@ubuntu:~$ ps -e |grep ssh
2363 ?        00:00:00 ssh-agent
3838 ?        00:00:00 ssh-agent
6074 ?        00:00:00 sshd
6130 ?        00:00:00 sshd
6318 ?        00:00:00 sshd

如果缺少ssh-agent或者sshd的任何一个,说明没有安装ssh服务。

安装ssh服务
输入命令:

#sudo apt-get install openssh-server


启动服务:

#/etc/init.d/ssh start


本机测试是否能够成功登录:

#ssh -l 用户名 本机ip
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  xshell Ubuntu
相关文章推荐