0

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?

5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.