美文网首页
07.SSH Tunnel

07.SSH Tunnel

作者: 笑着字太黑 | 来源:发表于2022-06-10 17:35 被阅读0次

在Windows上设定Portforward
Portforward:通过需要SSH验证访问的机器来访问目标机器上的网页

1.hosts文件中加入配置
127.0.0.1 [想通过Portforward访问的站点:abc.com]

2.Portforward
ssh -i ~/.ssh/xxxx.pem [user]@[中转机器的IP] -L 443:【目标机器的IP】:443
443是https端口,成功后窗口放着

3.可能需要把要访问的站点地址添加到机器的可信任网址中

4.访问
https://abc.com

通过ssh tunnel访问remote机器

ssh tunnel : ssh -i ~/ssh/xxxx.pem [user]@[ssh tunnel ip]
remote terminal : ssh -i ./key/xxxx.pem [user]@[remote ip:192.168.xxx]

相关文章

网友评论

      本文标题:07.SSH Tunnel

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