码迷,mamicode.com
首页 > 系统相关 > 详细

xshell连接虚拟机ubuntu

时间:2019-01-12 15:21:17      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:nbsp   round   strong   shel   not   net   cas   Opens   lin   

在ubuntu界面,打开终端terminal,输入:

ifconfig

出现如下界面:

fb993608316@ubuntu:/$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:f7:2d:bf  
          inet addr:192.168.204.128  Bcast:192.168.204.255  Mask:255.255.255.0

然后打开xshell:

技术分享图片

点击连接:

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

Type `help to learn how to use Xshell prompt.

这可能是因为没有安装openssh-server,执行以下代码:

sudo apt-get install openssh-server 

之后通过以下命令查看SSH是否启动: 

ps -e | grep ssh 

出现如下界面:

fb993608316@ubuntu:/$  ps -e|grep ssh
 2133 ?        00:00:00 ssh-agent
 5013 ?        00:00:00 sshd

完成上述这些操作后,再次使用XShell连接虚拟机,这时又弹出这个:

技术分享图片

输入用户名即可!其次又出现以下界面!

 技术分享图片

最后XShell虚拟机的界面出现:

技术分享图片

 连接成功!!!

xshell连接虚拟机ubuntu

标签:nbsp   round   strong   shel   not   net   cas   Opens   lin   

原文地址:https://www.cnblogs.com/ConnorShip/p/10259582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!