have tried a lot of ways to ssh into the virtualbox.

finally, get the easiest method[1]

Port Forwading

Be careful:

  1. install openssh-server in your guest machine
  2. make sure the ip of guest is correct

ref:

  1. https://unix.stackexchange.com/questions/145997/trying-to-ssh-to-local-vm-ubuntu-with-putty/146028#146028