一、服务器A安装Tailscale
1、安装Tailscale
sudo dnf config-manager --add-repo https://pkgs.tailscale.com/stable/centos/8/tailscale.repo
sudo dnf install tailscale
2、启动TailScale服务
sudo systemctl enable --now tailscaled
3、交互式登录(需浏览器访问)
sudo tailscale up --accept-dns=false
执行后会生成认证链接,在浏览器中登录TailScale账号(支持Google/Microsoft等)。
二、服务器B安装Tailscale
1、安装Tailscale
sudo dnf config-manager --add-repo https://pkgs.tailscale.com/stable/centos/8/tailscale.repo
sudo dnf install tailscale
2、启动TailScale服务
sudo systemctl enable --now tailscaled
3、非交互式认证(适合无界面服务器)
sudo tailscale up --accept-dns=false --authkey=tskey-auth-xxxxxxxxxx
需提前在TailScale管理后台生成并复制Auth Key。
4、验证连接状态
tailscale status
输出显示设备名称及分配的TailScale IP(如100.x.x.x)。

1万+

被折叠的 条评论
为什么被折叠?



