Basic SSH Tunnel
01.01.2006: Need to proxy through your SSH server? This will get you started:
ssh -D portnumber username@server
For example: ssh -D 4567 user@vzero.net
Now set up your browser to SOCK proxy to 127.0.0.1:4567. Make sure to void out the http and ssl proxy settings as they may take precedence and jam up the process.
04.28.2006: Need to tunnel vnc from your laptop to your VNC server? This is the way I do it:
1. Set up ssh tunnel
laptop> ssh remote_vnc_IP -L 5901:localhost:5900 -l username (in this case, 5900 = vnc server listening port, 5901 = local system port)
2. Connect VNC client to localhost:1 (or localhost:0 - whichever works)
3. UPDATE: 01/28/2008: to do it on your ASUS EEE, now simply run the command
krdc localhost:1
It works great.
08.04.2007
For resumable sessions: install vncserver
apt-get install vncserver
Then ssh into the remote box using the command listed above (instruction 1)
Then start the vncserver:
vncserver :1 -geometry 1024x768
Obviously, the -geometry flag is optional. But the default is something like 640x480. It will ask you for a VNC password that you will use when you vnc in.
Now follow step 2 above to connect to localhost:1
06.15.2010
For fast connections:
Using standard vnc server on remote Ubuntu box:
sudo apt-get install xtightvncviewer
ssh remoteIP -L 5901:localhost:5900 -l username
open new terminal:
xtightvncviewer -compresslevel 9 -quality 0 -encodings "copyrect tight hextile zlib corre rre raw" localhost:1
use vnc password (if needed)
Its fast!
-compresslevel 9 means max compression
-quality 0 means crappy image quality (but who cares!)
-encodings "copyrect tight hextile zlib corre rre raw" means use "copyrect encoding first (we need to specify this because we are tunneling thru ssh so we tell the vnc client to connectto localhost. When you connect to localhost, the vnc client uses raw encoding by default. raw = bad for remote connections.)