【问题标题】:Temporary port forwarding临时端口转发
【发布时间】:2013-09-14 18:04:35
【问题描述】:

对于家庭技术支持地狱 (tm) 我正在进入 ssh。

我的计划:

  • 在路由器中将端口 5022 转发到 5022。
  • them@theircomputer$ ssh -L 5022:localhost:22 localhost
  • me@mycomputer$ ssh -p 5022 them@theircomputer

结果:ssh: connect to host theircomputer port 5022: Connection refused

似乎很明显 ssh 隧道应该是隧道请求而不是监听。

我不想让他们通过 ssh 访问我的系统来设置反向隧道。

我不想将 5022 端口转发到 22 端口,也不想让 ssh 永久监听 5022 端口(出于安全考虑)

如何在系统上临时将端口 5022 转发到端口 22? (最好是短的oneliner!)

【问题讨论】:

    标签: ssh port iptables portforwarding


    【解决方案1】:

    更多的谷歌搜索导致 ssh 标志 -g

        -g      Allows remote hosts to connect to local forwarded ports.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-12
      • 2017-12-07
      • 1970-01-01
      • 2013-12-08
      • 1970-01-01
      • 2015-02-24
      相关资源
      最近更新 更多