Unable to connect to the vm from the host

That error message means the server to which you are connecting does not reply to SSH connection attempts on port 22. There are three possible reasons for that:

  1. You’re not running an SSH server on the machine. You’ll need to install it to be able to ssh to it.

  2. You are running an SSH server on that machine, but on a different port . You need to figure out on which port it is running; say it’s on port 1234, you then run ssh -p 1234 hostname.

  3. You are running an SSH server on that machine, and it does use the port on which you are trying to connect, but the machine has a firewall that does not allow you to connect to it. You’ll need to figure out how to change the firewall, or maybe you need to ssh from a different host to be allowed in.