参考:https://segmentfault.com/a/1190000002718360

内外运行:
sshpass -p 123456 ssh -fNR 5000:localhost:22 serveruser@101.200.50.71

外网运行:
ssh -fCNL "*:5005:localhost:5000" serveruser@localhost

注意:
(1)serveruser是外网linux的账号
(2)后面一条不能sshpass,必须手动输入密码不知道为什么
(3)客户端连接:ssh -p 5005 wyt@101.200.50.71,这个账号是内网linux账号

相关文章:

  • 2021-10-28
  • 2021-07-20
  • 2021-08-01
  • 2021-12-01
  • 2021-09-26
  • 2021-12-16
  • 2021-12-09
猜你喜欢
  • 2021-11-21
  • 2022-02-19
  • 2022-01-20
  • 2021-06-13
  • 2022-12-23
  • 2021-09-27
  • 2022-02-06
相关资源
相似解决方案