I'm using Virtual Box on
Linux rubi-pc 4.9.28-1-MANJARO #1 SMP PREEMPT Sun May 14 13:32:39 UTC 2017 x86_64 GNU/Linux
I've 2 VM running Ubuntu 16.04 Server. If I put Host-Only Adapter in Adapter 1 Option in both VMs. I can SSH into both VMs through my terminal. but no internet connection even though I've added NAT as my secondary Adapter.
If I put NAT in both VMs Internet connection working but I Can not SSH into VMs,
ifconfig details of one VM with Host-Only Adapter enabled in Adapter 1 Optiton
ubuntu@ubuntu:~$ ifconfig
enp0s3 Link encap:Ethernet HWaddr 08:00:27:a5:e7:1c
inet addr:192.168.56.103 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fea5:e71c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17424 (17.4 KB) TX bytes:15890 (15.8 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4960 errors:0 dropped:0 overruns:0 frame:0
TX packets:4960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:367040 (367.0 KB) TX bytes:367040 (367.0 KB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:4b:78:11
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Is there anyway that I can fix to work both internet and SSH ?
In a side not, I can not directly use copy paste function to Virtual Machines via local machine.