Reference article:
https://www.nakivo.com/blog/virtualbox-network-setting-guide/
https://help.ubuntu.com/lts/serverguide/openssh-server.html
https://technologyrss.com/ configure-static-ip-address- on-ubuntu-19-04 /
Set the network bridge mode
The reason for setting the bridge and the physical host in a LAN
because of my physical host is linux, virtual LAN adapter selection Paravirtualized Network Adapter (virtio-net) , if it is windows should be able to pick
Set a static IP
sudo vim /etc/netplan/50-cloud-init.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.1.101/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
version: 2
sudo netplan apply