It's Sunday morning and I'm trying to wrap my head around SSH and local port forwarding with the following two examples running on a machine with IP=
192.168.175.23 to local port forward incoming connections on 1234 to port 5000 of another machine with IP=
Now I read the MAN page and saw examples on the net but one thing still isn't clear to me, namely: why does example 2 work?
1: (shell prompt for clarity)
192.168.175.23:~ okihara$ ssh -nvNT -g -L 1234:192.168.200.7:5000 localhost
192.168.175.23:~ okihara$ ssh -nvNT -g -L 1234:localhost:5000 email@example.com
Example #1 seems rather self-explanatory, ie. login to the remote ssh is not needed and as such, I could local port forward to, eg. www.w3.org:80, but example #2 is a bit obscure to me.