先试方案 A(一条命令)。如果报错说找不到软件包,再走方案 B。
sudo apt update && sudo apt install -y tailscale
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/tailscale-archive-keyring.gpg
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt update && sudo apt install -y tailscale
sudo tailscale up
tailscale status
sudo systemctl enable --now ssh