Xshell 无法连接虚拟机中的ubuntu的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。    https://blog.csdn.net/qq_26941173/article/details/51173320
昨天在VMware Player中安装了ubuntu系统,今天想通过xshell连接ubuntu,结果显示 
Connecting to 10.7.100.182:22... 
Could not connect to '10.7.100.182' (port 22): Connection failed. 
VM中网络连接设置了Bridge模式。 (自己的所有配置都正确,能连接外网,别着急这是因为你的ubuntu中没有openssh-server的原因)

解决的方法
root@ubuntu:~# apt-get install openssh-server ( 我是在root模式下,不是root用户的话要加sudo)


安装完成后检查服务是否启动
查看server是否启动: 
#:ps -ef |grep ssh 
</pre><pre name="code" class="java">如果看到/usr/sbin/sshd -D,说明服务已经启动,否则服务尚未启动,那么需要启动server: 
 
#:/etc/init.d/ssh start 

接下来就可以用xshell连接了。如果xshell中看到乱码的情况,那么可以xshell的编码改成UTF-8! 
xshell中修改编码为UTF-8的方法:[文件]–>[打开]–>在打开的session中选择连接的那个 ,点击properties -> [Terminal ] ,在右边的translation先选择utf8,然后重新连接服务器即可。xshell不能连接VM中的ubuntu 

--------------------- 
作者:静水流深之鑫 
来源:CSDN 
原文:https://blog.csdn.net/qq_26941173/article/details/51173320 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/xujingcheng123/article/details/83536225