Me and my friend are trying to transfer files remotely using scp. We have both installed ssh server and turned it online but when trying to use the command nothing happens.
I am trying to transfer using his public ip.
It says it is listening on port 22, but I don’t know what is the problem.
You need to do three things:
- Make sure in VirtualBox the network of the VM is set to
bridged(you need to shut down the VM for this first). This will make the VM appear as a separate computer on the network, and make connecting to it more transparent.
- Check the IP address of the VM (e.g. by running
ip ainside the VM in a terminal)
- Login to the web interface of your router and add a port forward to the IP you found and port 22.
Now you should be able to login from a remote host with
ssh on your external IP (not the same as the VM’s IP!).