I mostly have Unix devices and use VNC through SSH to connect to all of them. However I have one Windows 10 PC and I cannot remote into it.
On the Windows 10 PC, I installed TightVNC Server (Version 2.8.63), listening on port 5900. I can successfully VNC to it without SSH.
I also set up OpenSSH on the Windows PC. It listens on port 22002. I can SSH successfully SSH into the PC.
Next I build the tunnel from my Unix device, with ssh -L 5901:localhost:5900 [email protected] -p 22002
. The tunnel successfully builds. I next try to establish the VNC session from my Unix device, connecting to localhost:5901
. This is where it fails, I get the response:
Connection failed to "localhost". Unable to communicate with "localhost". Make sure the remote computer is available and the firewall is not blocking screen sharing.
Things I've tried:
- Disabling all firewalls on the Windows PC, to be sure
- Enabling 'Allow Loopback Connections' in TightVNC preferences
- In the sshd_config file, I set 'GatewayPorts yes', 'PermitTunnel yes', and 'AllowStreamLocalForwarding yes'
Any other ideas??
localhost
?ssh -L 5901:localhost:5900 [email protected] -p 22002
I need to build the SSH tunnel withssh -L 5901:127.0.0.1:6900 [email protected] -p 22002
. Not sure why Windows doesn't like localhost there, but it's working now. Thank you!