I am connecting to ESXi with vSphere client from a remote LAN.
ESXi is running on 10.1.1.10, so I create an ssh tunnel (using cygwin but putty or plink should also work) with this command:
ssh -v -p 2222 -L 903:10.1.1.10:903 -L 902:10.1.1.10:902 -L 443:10.1.1.10:443 -L 80:10.1.1.10:80 firstname.lastname@example.org
VSphere does not connect, I get a "connection error" connecting to localhost. I can telnet the ports on localhost, they are responding.
Do I have to forward more ports apart from 80,433,902 and 903? When I connect with VSphere client from within the remote-lan to 10.1.1.10 it works.
In this drawing
= means WAN connection and
-stands for LAN connection:
[vSphere client machine] = = = ssh = = = [remote-lan-router] - - - [ESXi 10.1.1.10]
Edit: Solution (via accepted answer):
I added a host entry
127.0.0.1 myhost1 to the hosts file (c:\WINDOWS\system32\drivers\etc\hosts) on the vSphere client machine (which runs windows) and then connected the vSphere client to
At least with a single client controlling a single server this seems to work fine.