Update to use Tailscale SSH instead of OpenSSH
This commit is contained in:
@@ -21,6 +21,29 @@ ip addr show tailscale0
|
||||
```
|
||||
|
||||
## 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):
|
||||
```bash
|
||||
ssh-copy-id [email protected]
|
||||
|
||||
Reference in New Issue
Block a user