Update to use Tailscale SSH instead of OpenSSH

This commit is contained in:
Pierre Vandermeersch
2026-09-11 12:50:54 +02:00
parent 0bfa8bdc21
commit 1485084d0e
+23
View File
@@ -21,6 +21,29 @@ ip addr show tailscale0
``` ```
## SSH ## SSH
It is possible to let Tailscale SSH entirely by running on the server:
```bash
sudo tailscale up --ssh
```
### Undoing old UFW-SSH setup
Now because we switched to Tailscale SSH, we don't need the UFW rules anymore:
```bash
sudo ufw delete allow in on tailscale0 to any port 22 proto tcp
```
and move the authorize keys (for backup):
```bash
mv ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bak
```
To free up some ram/cpu, we stop openssh and disable it on boot:
```bash
sudo systemctl stop ssh.socket # stop the socket from starting openssh.
sudo systemctl disable ssh.socket # stop the socket from starting openssh.
sudo systemctl stop ssh
sudo systemctl disable ssh
```
## SSH-deprecated
From the client, to copy the public key to your server using its Tailscale IP (or the server's name if MagicDNS is enabled in the Tailnet): From the client, to copy the public key to your server using its Tailscale IP (or the server's name if MagicDNS is enabled in the Tailnet):
```bash ```bash
ssh-copy-id [email protected] ssh-copy-id [email protected]