Perhaps there is a better way of doing this, but I'm trying to access the web app running in the VM (VMware Player 16) from the host's Chrome browser.
- The host is Windows 10 and the VM is Ubuntu.
- I have a web app running in the Ubuntu VM at
192.168.39.113:80
(minikube
VM inside ofkvm2
). - The VM is using a bridged connection and has an IP of
10.0.0.205
. - I installed SSH on the Ubuntu VM with
sudo apt install openssh-server
. - I can SSH into the VM from the host now.
- I'm trying to create a tunnel with
ssh -L 8080:192.168.39.113:80 [email protected]
, but I'm still unable to to connect to the web app from the host's browser when I go to10.0.0.205:8080
. - I did enable
AllowTcpForwarding yes
followed bysudo service sshd restart
, which still I'm not able to connect to the web app from the hosts browser when I go to10.0.0.205:8080
.
Suggestions for how to resolve this?
You left off the local IP address in your command, which implies either use "127.0.0.1:8080" or "localhost:8080" in your local browser... or, alternatively, add the local IP that you want to use in the SSH command.
I tested with
zim
and started its web browser in one of my Virtualbox VMs..If I wanted to use any other "local host" ip like 127.10.10.1 in my browswer, I had to specifically designate it:
ssh -L 127.10.10.1:5151:192.168.100.100:6968 [email protected]
This worked using either the remote ssh server or the local ssh server ([email protected]) and I did not have to change sshd_config as AllowTcpForwarding is set to yes by default.
The only real blocker was attempting to use a specific IP address in the browser without designating one in the ssh -L command.