How can I SSH to VM that it's network configuration in NAT? My host is "Debian 8.6 x86_64" and VM is "CentOS 7.6 x86_64". The VM IP address is "10.0.2.15" and I set a secondary IP address to my NIC as below:
Code: Select all
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth1:0
iface eth1:0 inet static
address 10.0.2.14
netmask 255.255.255.0
broadcast 10.0.2.255
Code: Select all
eth1:0 Link encap:Ethernet HWaddr 00:11:3b:15:4a:32
inet addr:10.0.2.14 Bcast:10.0.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Thank you.