brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: turn on Tailscale SSH with tailscale set --ssh

Network and access
~/tips/tip-tailscale-set-ssh

tailscale set --ssh

Lets you log in over SSH to a machine using your tailnet identity instead of key files.

One flag and you can stop copying public keys around.

Tailscale SSH lets the tailnet handle authentication. You run the command once on the machine you want to log in to, then connect from any device that runs Tailscale.

tailscale set --ssh

ssh ubuntu@my-server

The host must be Linux, or macOS with the open source tailscaled variant, on Tailscale 1.24 or newer. Clients can be anything. There is no key pair to manage on the client, which is nice, and also a reason to read your rules properly.

You also need an ssh rule in the policy file and a network rule that lets the source reach port 22 on the destination. The default policy covers your own devices, but each destination still has to opt in with that flag.

Caveats: running tailscale set --ssh makes existing SSH connections to the Tailscale IP hang, and restarting tailscaled ends Tailscale SSH sessions. Only port 22 works. Keep another way in before you turn it off with tailscale set --ssh=false.

I like how little this asks of you compared with the old routine of key files and authorized_keys. Fewer moving parts means the policy file does the heavy lifting, so that is where I would spend my attention.

Further reading: Tailscale SSH, On this site: use action check in a Tailscale SSH rule for a re-login, On this site: put a tests block in your Tailscale policy file, On this site: Guide: manage your Unraid server from anywhere with Tailscale and no open ports

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link