If you want to just set port forwarding instead of having a shell kept open while port forwarding is effective, use the following form of ssh:
ssh -fL8000:www.kernel.org:80user@localhost -N
The -f option instructs ssh to fork to background before executing the command. -N tells ssh that there is no command to run; we only want to forward ports.