I am trying to transfer a file from my Ubuntu Server 18.04 installed in VirtualBox to my local machine, but I can't get it work.
The network in place is NAT, in VirtualBox I have set port forwarding.
*Name* *Protocol* *Host IP* *Host port* *Guest IP* *Guest port*
ssh TCP 2222 22
To connect to my server I'm using ssh xander@127.0.0.1 -p 2222
.
However I'm not able to transfer a file from the VirtualBox instance to my local machine.
scp user@remotehost:/file/to/copy /local/destination
doesn't work I have tried several times.
I have tried following this stackoverflow guide for NAT firewall based machines but whenever I ran this command with my credentials ssh ComputerBUser@ComputerB -R 2222:localhost:22
I get Bad port '2222:localhost:22'
so I cant do much.