美文网首页
ssh端口映射

ssh端口映射

作者: 950545c4cd64 | 来源:发表于2019-03-12 21:31 被阅读0次

ssh -f -N -g -L 12345:localhost:19229 root@ss -b 0.0.0.0
ssh -f -N -g -L 12346:localhost:19229 root@ss -b 0.0.0.0
ssh -f -N -g -L 12347:localhost:19229 root@ss -b 0.0.0.0
ssh -f -N -g -L 12348:localhost:19229 root@ss -b 0.0.0.0
1.-L选项表示本地没有远程服务器ss 19229端口提供的服务映射到本地12348的端口上,ss是远程服务器的别名,-b表示是bind绑定到本地机器网卡 ,0.0.0.0表示任何网卡

ssh -f -N -g -R 12345:localhost:19229 root@ss -b 0.0.0.0
ssh -f -N -g -R 12345:localhost:19228 root@ss -b 0.0.0.0

2.-R表示把本地12345端口提供的服务绑定到服务器ss的19228端口,-b表示是绑定远程主机的任何网卡

相关文章

网友评论

      本文标题:ssh端口映射

      本文链接:https://www.haomeiwen.com/subject/zayopqtx.html