In my little writeup about SSH tunneling I have provided an introduction to using the SSH local and remote port forwarding features, with an emphasis on remote port forwarding useful for X tunneling. Here's a complete example of local port forwarding, useful for tunneling HTTP through multiple gateways.
