Part 2: Connect from your computer
9. SSH from an iPhone (optional)#
What you'll do: control the server from your phone with the free Termius app. The same steps work on Android. Time: 15 minutes.
Step 1: Install Termius#
Install Termius from the App Store. You can skip creating an account.
Step 2: Make a key on the phone#
- In Termius, open Keychain → + → Generate Key.
- Type: ED25519. Name:
iphone-homeserver. Add a passphrase and save it in your password manager. - Save. Then open the key and choose Copy public key (or Export → Copy).
Step 3: Add the phone's public key to the server#
Do this from your Mac or PC, which can already log in:
ssh homeserver
nano ~/.ssh/authorized_keys
Go to the end of the file with the arrow keys and press Enter to start a new line. Paste the phone's public key. It's one long line starting with ssh-ed25519. Save (Ctrl+O Enter) and exit (Ctrl+X).
Check: each device should be exactly one line.
wc -l ~/.ssh/authorized_keys
(2 lines = Mac + phone, 3 lines = Mac + PC + phone.)
Sending the public key to your computer
The public key is safe to share. You can AirDrop it, or email it to yourself. Never send the private key.
Step 4: Add the server in Termius#
Hosts → + → New Host:
| Field | Value |
|---|---|
| Alias | homeserver |
| Hostname | homeserver.local (home only; after Chapter 14 use the Tailscale name) |
| Username | alex |
| Key | iphone-homeserver |
Tap the host to connect.
Done when: Termius opens alex@homeserver:~$ without asking for the server password.
Next: 10. Lock SSH: keys only