

The quickest way to copy your public key to the Ubuntu host is to use a utility called ssh-copy-id. Step 2 - Copying the Public Key to Your Ubuntu Server The next step is to place the public key on your server so that you can use SSH-key-based authentication to log in. You now have a public and private key that you can use to authenticate. SHA256:/hk7MJ5n5aiqdfTVUZr+2Qt+qCiS7BIm5Iv0dxrc3ks key's randomart image is: Your public key has been saved in / your_home/.ssh/id_rsa.pub If you can't, you need to recheck the VM's SSH and firewalling configuration.OutputYour identification has been saved in / your_home/.ssh/id_rsa If you can, then you need to double-check the forwarding configuration in your router.


Apologies if you already did this, but your question was not clear about this.īasically you have to change the VM's network configuration and set it to "Bridged". You may be missing some configuration on the VirtualBox side. I think the port redirection you did was from your home router to your PC, not to the VM. However this means that the outside world doesn't really know about the VM and can't access it directly. Then, VirtualBox does network accesses "on behalf" of the VM, making it appear as just another application running on your PC.

VirtualBox makes the VM think it's connected to a network, but in reality VirtualBox is providing network services, including a mini DHCP server. By default VirtualBox works in "NAT" mode, meaning that it builds a "virtual" network and translates network accesses from the VM so that to the outside world, they appear to come from your actual computer.
