解决在linux中执行tailscale up却不弹出验证网址【Tailscale】【Linux】

文章目录

问题

最近有远程办公需求,需要连接内网服务器,又不太想用todesk,于是找到一个安全免费可用的Tailscale · Best VPN Service for Secure Networks,在windows中顺利注册账号后,登陆了我的windows device后,按照官网流程在linux中输入:

curl -fsSL https://tailscale.com/install.sh | sh

命令执行的输出中并没有弹出任何登录url的提示,甚至一度想去机房看看究竟。

root@ubuntu:/home/ubuntu/cold# curl -fsSL https://tailscale.com/install.sh | sh
Installing Tailscale for ubuntu jammy, using method apt
+ mkdir -p --mode=0755 /usr/share/keyrings
+ curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg
+ tee /usr/share/keyrings/tailscale-archive-keyring.gpg
+ + curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list
tee /etc/apt/sources.list.d/tailscale.list
# Tailscale packages for ubuntu jammy
deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu jammy main
+ apt-get update
Hit:1 https://mirror.nju.edu.cn/ubuntu jammy InRelease
Hit:2 https://mirror.nju.edu.cn/ubuntu jammy-updates InRelease                                                                                              
Hit:3 https://mirror.nju.edu.cn/ubuntu jammy-backports InRelease                                                                                            
Hit:4 https://mirror.nju.edu.cn/ubuntu jammy-security InRelease                                                                                             
Get:6 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]                                                                                     
Get:7 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64  InRelease [1,484 B]                                                            
Hit:8 https://deb.nodesource.com/node_20.x nodistro InRelease                                                                                               
Hit:9 https://download.docker.com/linux/ubuntu jammy InRelease                                                                                              
Hit:5 https://packages.microsoft.com/repos/code stable InRelease                                                                                            
Err:6 https://dl.google.com/linux/chrome/deb stable InRelease                                                                          
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2
Get:10 https://pkgs.tailscale.com/stable/ubuntu jammy InRelease                                                  
Hit:11 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease
Fetched 8,056 B in 2s (3,972 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://deb.nodesource.com/node_20.x nodistro InRelease' doesn't support architecture 'i386'
W: Failed to fetch https://dl.google.com/linux/chrome/deb/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2
W: Some index files failed to download. They have been ignored, or old ones used instead.
+ apt-get install -y tailscale tailscale-archive-keyring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
tailscale is already the newest version (1.64.0).
tailscale-archive-keyring is already the newest version (1.35.181).
0 upgraded, 0 newly installed, 0 to remove and 529 not upgraded.
+ [ false = true ]
+ set +x
Installation complete! Log in to start using Tailscale by running:

tailscale up
root@ubuntu:/home/ubuntu/cold# 

解决

看到tailscale up说明已经安装成功,并且启动成功了。需要在官网的这一步后,如果你像我一样没有任何登录url弹出,输入这个:

tailscale login

在这里插入图片描述

你就看到每一个论坛里提到的这个验证网址了,只需要在你的目前设备上点进去就可以帮助linux服务器这边做验证,哈哈,不用去机房了。
在这里插入图片描述

提醒

1.记得在web设备管理这里,设置key不过期,我这里设置过了,所以再点击就是Enable key expiry
在这里插入图片描述

2.查看tailscale状态

systemctl stauts tailscaled

3.关闭服务

tailscale down

4.查询 Tailscale 服务分配给你的 IPv4 地址

  tailscale ip -4

5.使用 Visual Studio Code 的 Tailscale 扩展:传送门,其中还发现一个特有意思的事情:账号A登陆了服务器,一旦使用了tailscale up --ssh去接管了ssh,只有账号A在vscode中享受文件目录,其他账号的vscode操作服务器直接就瘫痪了一样,不仅目录看不了,甚至登不上服务器。这个插件还是有问题的,本地的git也挺好用的哈哈ssh -p xxx user@host,还有诸多SSH工具Aechoterm可以用,不必在tailscale插件上吊死。
6.一个 Tailscale 账号不能用于登录多台设备来加入不同的 Tailscale 网络,因为每个设备在 Tailscale 网络中必须有一个唯一的标识。如果你尝试用同一个账号在两台设备上运行 tailscale up,第二台设备将接管该账号,导致第一台设备从 Tailscale 网络中注销,所以你要分享可以选择:

  • 分享单台机器
    在这里插入图片描述

  • 邀请其它用户进入网络,分享全部机器
    在这里插入图片描述

  • 过段时间登不上服务器了可以排查:服务器登录账号改变导致原节点下线,节点过期自动下线,服务器ip改变

  • 同一个账户受邀加入其它私人网络,账户上线后却显示不在加入的私人网络中:说明你在自己的私人网络中,但凡收到邀请,你控制台右上角账户点击可选择多个organization,和账户同名的是自己的私人网络其他的才是受邀加入的私人网络,切换即可。同样也说明,在本机节点登陆后,看到usernameorganization不同名说明你加入了一个owner不是你的私人网络,你在这个网络上线了一台设备,成为该网络中的一个node

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

来杯Sherry

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值