It’s simple in its basic form!


$ ssh -L <local_port>:<host2>:<host2_port> -N <username>@<host1>

This sets up an SSH tunnel from the machine you are at to HOST 2 via HOST 1.