random tips on coding, ops, ...

配置 SSH 做代理或端口映射

  1. 作 socks 代理

    ssh -D [bind_address:]port username@remote.host.com
  2. 作端口映射

    本机端口port被映射到远端host的hostport端口

    ssh -L [bind_address:]port:host:hostport

    远端端口port被映射到本地host的hostport端口

    ssh -R [bind_address:]port:host:hostport

comments powered by Disqus