歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> SHELL編程 >> xshell不能連接VM中的ubuntu

xshell不能連接VM中的ubuntu

日期:2017/3/3 12:33:21   编辑:SHELL編程

昨天在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模式。

網絡查找解決辦法如下:

xshell連接不了ubuntu,原因沒有安裝openssh-server,解決方法:

$:sudo apt-get install openssh-server

查看server是否啟動:

$:ps -ef |grep ssh

如果看到/usr/sbin/sshd -D,說明服務已經啟動,否則服務尚未啟動,那麼需要啟動server:

$:/etc/init.d/ssh start

接下來就可以用xshell連接了。如果xshell中看到亂碼的情況,那麼可以xshell的編碼改成UTF-8:

xshell中修改編碼為UTF-8的方法:

[文件]–>[打開]–>在打開的session中選擇連接的那個 ,點擊properties -> [Terminal ] ,在右邊的translation先選擇utf8,然後重新連接服務器即可。

Copyright © Linux教程網 All Rights Reserved