Because the VM is behind the VirtualBox NAT router you can't access it directly. Unless you add a port forwarding rule in the VM settings that maps a host port to a guest port. Host refers to your machine and guest to the VM.
Because the VM is behind the virtualization software router you can't access it directly. Unless you add a port forwarding rule in the VM settings that maps a host port to a guest port. Host refers to your machine and guest to the VM.
Host & guest IP addresses don't need to be specified, guest port needs to be 22 because that's SSH default listening port.
@ -24,6 +30,6 @@ ssh -p HOST_PORT root@localhost
It is recommended to change the default SSH port (22) to prevent bots from trying to connect to it.
Since we are pretending that the guest VM is a server, change the SSH service port and make sure the port forwarding of the Virtual NAT network still works !
Since we are pretending that the guest VM is a server, change the SSH service port and make sure the port forwarding still works !
In addition, you will need to allow the new port in the firewall `ufw`.