The first parameter is the local port followed by the remote endpoint "host:port" and finally the intermediate host, in this example I am connecting to
remotehostname:3306 (mysql server) which is only reachable from the intermediate server (
intermediate-hostname)
$ ssh -L 3306:remotehostname:3306 intermediate-hostname