0

I went to Devices -> Network Adapters.. -> Port Forwarding and added the following:

Name: SSH Protocol: TCP Host IP: 127.0.0.1 (I also tried blank) Host Port: 22 Guest IP: 127.0.0.1 (I tried blank here as well) Guest Port: 4022

I then tried the following via my Ubuntu virtual machine:

sftp -oPort=4022 [email protected]

And I got the following:

ssh: connect to host 127.0.0.1 port 4022: Connection refused
Couldn't read packet: Connection reset by peer

I can connect to the host from the host via port 22 just fine. I allowed port 22 in the firewall but that doesn't seem to do anything either.

Any ideas?

1 Answer 1

1

Name: SSH Protocol: TCP Host IP: 127.0.0.1 (I also tried blank) Host Port: 22 Guest IP: 127.0.0.1 (I tried blank here as well) Guest Port: 4022

This sets up a port forward from the host to the guest, not the other way around. It would accept connections to port 22 on the host, and forward those connections to port 4022 on the guest.

If you want to connect from the guest to the host, just connect to the host's regular LAN IP address, whatever that is.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .