I looked at the ssh manual (man ssh
) and read the definitions for -L
and -R
option but don't quite understand the difference. Both seem capable of forwarding requests to a desired host and port. Can someone trying explaining the difference to a kid... What's the primary different between the two options?
Asked
Active
Viewed 4,389 times
10

user526657
- 103
- 1
- 4
1 Answers
14
It's right there, in the man page:
-L
Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side.-R
Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the local side.
(highlighting by me)
The difference is the direction. -L
forwards local to remote, -R
the reverse.

Gerald Schneider
- 23,274
- 8
- 57
- 89