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的原因)
解決的方法
[email protected]:~# 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
版權宣告:本文為博主原創文章,轉載請附上博文連結!