Basic Lab Setup

For this lab sessions, we are using your host machine as the ssh client and your Ubuntu VM as the ssh server.

Please download following applications

Setting up virtualbox

Installation of virtualbox and Downloading Ubuntu iso image

Creating the VM

Start virtualbox and Click on New button (at top-right) to create new virtual machine Enter name of the VM as: Ubuntu. Select OS Type: Linux Select Version: Ubuntu (64-bit) Then click on Continue button

This might take couple of minutes

(Note down the location of vdi image file when virtualbox flashes it on the screen)

Setting up Network Interface

Setting up boot device and Booting

Installation

Installation is quite simple. You can figure it out your self; (Next… Next… Next) If asked, make sure you select Install OpenSSH Server. We may also not need any Feature Server snaps at the moment.

Detailed installation guide can be found in the ubuntu official documentation

Setting UP IP Addresses

After you install the Ubuntu OS, change the IP address.

Run the commands below to create a new network configuration file

sudo vi /etc/netplan/50-cloud-init.yaml

Press i to edit the file

Then configure IP addresses as shown below

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
 version: 2
 renderer: networkd
 ethernets:
   enp0s3:
            dhcp4: false
            dhcp6: false
            accept-ra: no
            addresses:
                - <Your IPv4 Address>/<subnet>
                - <Your IPv6 Address>/<subnet>
            gateway4: <Your IPv4 Gateway>
            gateway6: <Your IPv6 Gateway>
            nameservers:
                addresses:
                  - <Your IPv6 DNS>
                  - <Your IPv4 DNS>

Exit and save your changes by pressing esc and type :wq

Run the commands below.

sudo netplan apply

Then check the connectivity by pinging your favorite destination.