ssh遠程訪問虛擬機中Ubuntu系統

使用xshell遠程訪問虛擬機中Ubuntu系統shell

一、設置虛擬機網絡鏈接方式:選擇對應虛擬機,右擊選擇「設置」->網絡適配器->網絡鏈接,選擇:橋接模式(B):直接鏈接物理網絡網絡

二、進入虛擬機系統,重啓網絡ssh

sudo /etc/init.d/networking restart工具

三、查看虛擬機中系統網絡ippost

ifconfigrest

四、與實體機進行ping,看是否能夠相互ping通 如:ping 192.168.1.24server

五、查看是否安裝ssh服務:ssh localhostip

若是提示爲:ssh:connect to hostlocal host post 22:Connection refused表示沒有安裝,則安裝ssh服務: sudo apt install -y openssh-server虛擬機

六、啓動ssh服務it

service ssh start

七、查看ssh服務

ps -aux |grep ssh

八、在真實機中安裝如xshell工具進行訪問

相關文章
相關標籤/搜索