Setting up Ubuntu 18.04 LTS on VirtualBox and connect it from the host OS.
Download .iso from https://www.ubuntu.com/#download and install it.
On Ubuntu terminal, run this command and install SSH serer.
$ sudo apt-get install openssh-server
On VirtualBox, Setting > Network > Adapter1 > Advanced > Port Forwarding
Name | Protocol | Host IP | Host Port | Guest IP | Guest Port |
---|---|---|---|---|---|
SSH | TCP | 3022 | 22 |
You can turn off GUI.
$ systemctl set-default multi-user.target
After launch Ubuntu, run the command on your host OS:
ssh -p 3022 username@127.0.0.1