Jan 1 2014
Tunneling to VNC over SSH
You may want to connect to a headless/monitorless linux pc with a vnc server running that only exposes an SSH port.
I have used the following steps from windows.
- Server:
Run VNCServer
If not running already start your server. You can set the resolution using -geometry tag. This will open a new port/session.vncserver -geometry 1920x1200
- Workstation:
Create the tunnel to VNC portThis maps the local pc port 5905 to localhost:5905 on the remote machine. VNC uses ports 5901 to 5909.ssh -L 5905:localhost:5905 menelaos@menelaos.server.net -p 22
- WorkStation:
Create tunnel if needed of X-Serverssh -L 6005:localhost:6005 menelaos@menelaos.server.net -p 22
- Server:
Run VNCConfig to enable remote clipboardOpen up a terminal in your vnc session, and run:vncconfig
If your running through a separate ssh guiless console, you will have to export the console display. Whenever running commands in an ssh terminal that use display you will get an error. You must run:
export DISPLAY=:5
where =:5 below specified session/screen 5. On my own server I have to keep the vncconfig dialog running for clipboard to work but this may be due to permissions on the configuration file.