利用Cloudflare实现内网穿透访问内部ssh服务器

参考文档:SSH | Cloudflare Zero Trust docs

利用Cloudflare的Zero Trust的Tunnel功能实现内网穿透访问ssh服务器。

具体操作流程可以查找视频网站或者按照上面参考文档的链接给出的指示。

----------------

但是如果你已经搭建好了tunnel,无法建立连接的原因是:需要在客户端也安装cloudflared,并配置/.ssh/config:

vim ~/.ssh/config

#在文件中添加
Host ssh.example.com
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h

注:如果你是在macOS上用Homebrew安装的cloudflared,路径是/opt/Homebrew/bin/cloudflared。

这在参考文档的第三节中有介绍。
SSH | Cloudflare Zero Trust docsicon-default.png?t=O83Ahttps://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/#connect-to-ssh-server-with-cloudflared-access

Cloudflare Tunnel can also route applications through a public hostname, which allows users to connect to the application without the WARP client. This method requires having cloudflared installed on both the server machine and on the client machine, as well as an active zone on Cloudflare. The traffic is proxied over this connection, and the user logs in to the server with their Cloudflare Access credentials.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值