Securing VNC in Linux? (Or an alternative)

debian0001

Senior member
Jun 8, 2012
464
0
76
Anyone know a pretty clear cut guide to setting up VNC over SSH for Linux or another secure method?

I have RDP setup on my Windows 10 computer listening on an obscure port but I want to get back to using Linux. The VNC option is rather lacking but if that's all there is I just want to test it out in a VM before converting back to Linux.
 

Red Squirrel

No Lifer
May 24, 2003
70,157
13,567
126
www.anyf.ca
Look up up how to use SSH tunnels. It's something that will work by default with just a regular SSH connection but it just requires a bit of setting up in the client (Putty etc). Essentially what it will do is open a local port on the client machine (ex: 127.0.0.1:5900) and when you connect to it, it's like connecting to the server on the remote network. That way you don't need to open up VNC or RDP over the internet (which is a really bad idea). You can do this with even windows too because you can specify any host on the network you're connecting to, does not need to be the SSH server itself.
 

ch33zw1z

Lifer
Nov 4, 2004
39,471
20,154
146
SSH setup is the same, like Red said....after you start up the tunnel, VNC should hit 127.0.0.1:port_here or localhost:port_here

So there's some port forwarding to setup also