1.設置虛擬網絡



2.設置linux ip
打開Ubuntu的終端,輸入:
sudo gedit /etc/network/interfaces
原有內容只有如下兩行:
auto lo
iface lo inet loopback
在后邊追加
auto ens33
iface ens33 inet static
address 192.11.1.199
netmask 255.255.255.0
gateway 192.11.1.1
network 192.11.1.0
broadcast 192.11.1.255
3.重啟linux 網絡
sudo /etc/init.d/networking restart
linux 與 window 互相ping 的通
4.設置端口
netstat -nat | grep 22
關閉防火牆
sudo ufw disable
OK 完成
在本機用 SecureCRT 連接虛擬機
