Ubuntu ssh服务安装

在使用xshell连接ubuntu虚拟机时,提示

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

在主机使用ping命令,是可以与该虚拟机ping通的。问题在于ubuntu需要开启ssh服务才能使用xshell进行远程连接。

1.使用命令ps -e|grep ssh来查看是否开启了ssh服务

2.如果没有则使用apt-get安装

安装ssh-client命令:sudo apt-get install openssh-client

安装ssh-server命令:sudo apt-get install openssh-server

3.安装后启动服务sudo /etc/init.d/ssh start

posted @ 2016-10-13 12:32  大地的谎言  阅读(194)  评论(0编辑  收藏  举报