X port forwarding

basically sshd must support it
X11Forwarding yes
X11DisplayOffset 10

and ssh client must request it
~/ssh/config
Host *
  ForwardAgent yes
  ForwardX11 yes
  Compression yes

  or use ssh -X -C somehost.net    to connect
  -X for x
  -C for compress

debian potato notes
ssh uses xauth to set the magic cookie
xauth is in xbase-clients package
so you need
xbase-clients
xfree86-common
xlib6g


More complex scenario
host A - the host with xserver we want to connect to (the one with sit at:-)
host B - masq firewall for host A
host C - masq firewall for host D
host D - the host we want to run X apps at

1. connect from A to C then from C to D
2. then set up tunnel like this
ssh -C -L 6001:A:6000 B
3. get to D again first to C then to D
4. set DISPLAY to
127.0.0.1:1
5. run an xapp :-)

or
1. connect to machine you want to run the app at calisto
2. ssh -L 6001:syrokrem.labath.int:6000 labath.org
(which means that we login to parenica(labath.org) from 
calisto and tell parenica to forward everything from our port 6001 to port 6000 on syrokrem(labath.int) )
3. connect to calsito again and set the DISPLAY=127.0.0.1:1
that's it
make sure your ssh servers support X11 port forwarding
also make sure your X is listening on tcp
in debian
startx: /etc/X11/xinit/xserverrc
xdm: /etc/X11/xdm/Xservers


-------------
pop3 forwarding

ssh -L 1110:mail.labath.org:110 parenica.labath.org

will forward port 1110 on localhost to mail.labath.org:pop-3 after connecting 
to parenica.labath.org
now go to localhost:1110 to connect to pop-3

you have to be root to do this
ssh -L 110:mail.labath.org:110 -l jakub parenica.labath.org
this way you can use localhost as your pop3 server without need to specify a
port

interactive commands
~? - help message
~# - list message