问题原文
原帖链接 · user526657 · CC BY-SA 4.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?
已采纳解答
原帖链接 · Gerald Schneider · CC BY-SA 4.0
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
