Open Putty and paste the IP address of your virtual machine to Host Name (or IP address) field. Check that Port value is 22 and SSH is selected as a connection type. Click Open.
If you are prompted for SSH key (Putty Security Alert), click Yes.
You should now see the login screen. Use the following login credentials:
Download the VirtualBox option suitable for your computers operating system (for example choose Windows hosts if you are running Windows 10 on your computer).
Open the installer you downloaded and follow the installation instructions.
After successful installation open the VirtualBox. You should now see the main view of VirtualBox like in the picture below.
Start creating a new virtual machine by clicking New button.
Give name to your virtual machine (for example Ubuntu). Type and Version fields will be automatically detected according to Name field. Click Next button.
Adjust memory size to match your computers available memory (keep memory preferably in the green area). We are using Ubuntu server version which has the minimum RAM requirement of 512 MB (0.5 GB). Although it is advisable to use at least 1 GB for the VM. Then click Next
Next step will be the Hard disk selection. As we are preparing a completely new installation of Ubuntu, select Create a virtual hard disk now option and select Create.
Now prepare the virtual hard disk for your Ubuntu following these steps:
Choose VDI as your hard disk file type and click Next.
On the next step you may choose either one of the following:
Dynamically allocated: Only necessary space is allocated from your computers hard drive and is filled up when disk space is filled on your Ubuntu.
Fixed size: Disk space is allocated immediately from your computers hard drive.
Next, change virtual hard disk location if needed and set the size for the disk to be at least 10 GB. Then click Create. If you chose fixed size disk, this process takes a couple of minutes depending of the size you chose for your hard disk.
You should now see your Ubuntu virtual machine listed on your VirtualBox window. Select your virtual machine and click Settings.
Set the following settings:
General → Advanced: Set Shared clipboard to Bidirectional.
Storage: Click the Empty setting under Controller: IDE and then click disc icon from right and click Choose a disk file.... Browse the Ubuntu image file from your computer you downloaded earlier and click Open.
Save all the settings by clicking OK
Now from the VirtualBox main window select your virtual machine and click Start.
VirtualBox will ask your start-up disk. Choose your Ubuntu iso image file from the list and click Start. The installation of your Ubuntu should now start.
Use all default settings for the installation except these:
Set your keyboard language to match your preferred language.
Install OpenSSH server when prompted.
After the successful installation your virtual machine will be rebooted.
Remove the installation media by selecting Devices → Optical Drives → Remove disk from virtual drive.
You should have the login screen similar to the example below after successful reboot.
Important: The default resolution will be 640x480 or 800x600 for Ubuntu server running in VirtualBox so it is suggested to do the following changes for using higher resolution.
Login to your Ubuntu
Open the grub file for editing by typing sudo nano /etc/default/grub
Add this line to the end of the file (You may also use lower 1024x768 resolution):
GRUB_GFXPAYLOAD_LINUX=1280x1024
Exit the file and save changes with keyboard shortcut Ctrl + x followed by Y and enter.
Type sudo update-grub.
Then type use command reboot to restart your virtual machine.