本地nas通过cf tunnel 连接 ssh

date
Sep 12, 2023
slug
nas ssh connect by cloudflare tunnel
status
Published
tags
Network
nas
summary
type
Post
本地nas通过cf tunnel 连接 ssh
先确保已经开通cf tunnel 并在本地nas局域网安装内网穿透,即域名绑定到了ssh:localhost:22
 
先在客户机上安装cloudflare
以debian11 说明:
下载官方deb包:
选择debian后下载到客户机:
dpkg -i cloud flared-linux-amd64.deb
设置ssh配置文件以域名登录
vim ~/.ssh/config
修改下面的example.com改为自己的cf域名
Host ssh.example.com ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
最后通过域名登陆远程nas
ssh <username>@ssh.example.com
 

© suguo210 2022 - 2023