Skip to content

Instantly share code, notes, and snippets.

@cshuaimin
Last active September 6, 2017 15:45
Show Gist options
  • Save cshuaimin/355554114ea6b93c1ed1bf4539e69438 to your computer and use it in GitHub Desktop.
Save cshuaimin/355554114ea6b93c1ed1bf4539e69438 to your computer and use it in GitHub Desktop.
SSH local port forwarding.
i@my-laptop$   ssh -fNTgL      port:    host:hostport    user@server
        |                        |           |                  |
        |                        |           -------------------|------------
        |                        |                              |           |
     ---|------------------------|-------------------------------           |
     |  |                        |                                          |
     |  ----------------         -------------                        --------------
     |                 |                     |                        |            |
     v                 v                     v                        v            v
让 server把 对     运行这条命令的机器上的       port端口  的请求转发到      host上的    hostport端口上去。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment