在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
来源:oschina
链接:https://my.oschina.net/u/2626684/blog/796887