Problem

If you have Ubuntu Server under Virtualbox or VMware Player you don't have GUI. Very often you will need to write hundreds commands and you will need copy paste.
Installing VirtualBox "Guest Additions" and setting "Shared Clipboard: Bidirectional" for Virtualbox will not work. So you can do workaround by SSH connection to your Virtual Machine. This solution will work on both VM products and its easy to be done.

Solution Connect to VM with SSH

  • Start VirtualBox or VMware Player.
  • Start the VM the one in question.
  • Install SSH and allow port 22 (if you have ufw enabled)
sudo apt update

sudo apt install ssh
#or
apt-get install openssh-server 

sudo ufw allow 22      
  • find the machine IP address by:
ifconfig    
  • go to Host OS terminal or putty:
ssh 192.168.100.9 -p 22

where the IP is the IP found on the previuos step

  • After successful login you have copy and paste to your VM, full screen and your preferred format of commands.

Connect to VM with FTP

If you want to connect to your VM - Ubuntu 16 with FTP you don't need any special software to your guest OS. The steps are simple:

  • Start guest OS
  • Find the IP with IP config:
ifconfig    
  • Open FTP client on host machine (FileZilla, MobaXterm etc..)
  • enter the ip of the machine 192.168.100.9
  • the port 22
  • the user name
  • the password

Extra steps Change network settings if needed

Virtual box

  • Make sure ssh client is installed on your Linux. If not, install it.
  • Power down the OS.
  • Go to settings
  • network
  • on adapter 1 choose Bridge Adapter
  • click ok.
  • Now start your OS.
  • Run and get inet address which is the needed IP.
ifconfig    

Result would be:

wlan0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:X

inet addr:192.168.100.5 Bcast:XX.XX.XX.XX Mask:XX.XX.XX.XX

Do I need virtual guest in this case?

For Ubuntu server (and Virtual Box) you still need to install guest additions in an Ubuntu server for the following features they provide:

  • Shared folders
  • Time sync with the host
  • automatic guest logon

How to install virtual guest additions: Ubuntu add virtual guest additions