window ssh 连接 本地虚拟机ubuntu 16

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 连接虚拟机

原文地址:https://www.cnblogs.com/leshang/p/5822381.html