In this article I will help you configure your ubuntu machine to enable ssh connection from other devices.
Step 1
Before we do anything else, open up your terminal. Then type
ip addr show
Your ip address is shown at the line starting with inet,
My ip address is 10.0.2.15
Note your ip address down.
Step 2
After you get this information power off your Virtual Machine and go to VirtualBox Manager -> Settings -> Network. After that click on advanced then go to Port Forwarding.
You probably will have a blank page here, then click on + icon on the upper right side. Then fill in the spaces accordingly. You will run it on your localhost (127.0.0.1) of your virtual Ubuntu machine. We will be using port 2222. Your Guest IP should be whatever the value that you already have from the previous step. Guest Port value should be 22. Hit OK and then go back to your terminal.
After this go to System and enable Network under Boot Order, also Enable I/O APIC under Extended Futures.
Step 3
Turn on your Virtual Machine and open your Terminal.
In order to download ssh, you should type;
sudo apt-get install ssh
sudo apt-get install openssh-server
Step 4
Once you downloaded the ssh, you should start the ssh connection by typing;
sudo service ssh start
Step 5
Go to your Computer’s terminal and then type
ssh <username>127.0.0.1 -p 2222
<username> should be replaced with your ubuntu username on your virtual box. Mine is mertay as you can see from Figure 3.
You are all set! Hope you enjoyed reading this and helped you on whatever crazy thing you are trying to achieve.