Connect a Mac
Turn on Remote Login on macOS and add the Mac to SwiftServer with password or key login.
macOS ships with an SSH server — it just needs to be switched on.
Turn on Remote Login
On the Mac you want to reach:
- Open System Settings (Apple menu → System Settings).
- Go to General → Sharing.
- Turn on Remote Login.
- Click the ⓘ next to it to control who may log in: All users, or Only these users with an explicit list. Enabling Allow full disk access for remote users is optional and only needed if sessions must read protected locations.
Apple's reference: Allow a remote computer to access your Mac.
On older systems (macOS 12 and earlier) the same switch lives in System Preferences → Sharing → Remote Login.
Add the Mac in SwiftServer
Add a machine with:
- Host — the Mac's address. On your home or office network that is its
local IP (shown right in the Sharing pane, e.g.
192.168.1.20) or itsname.localhostname. - Username / Password — the macOS account's short name and login password. For key login, install your public key first.
Test the connection, trust the host key, and everything works: monitoring (see the macOS platform notes for what differs from Linux), terminal, SFTP, and Docker when Docker Desktop or a CLI install is present.
Reaching a Mac from outside your network
192.168.* addresses only work on the same network. From elsewhere you need
one of: a VPN into the network (including Tailscale-style mesh VPNs), a
router port forward to the Mac's port 22, or a
jump host that both sides can reach.
If the connection fails
- Connection refused / timeout — Remote Login is off, or a firewall blocks port 22. Check System Settings → Network → Firewall.
- Authentication failed — the account is not allowed under Only these users, or the password is the account's iCloud-style short name mismatch; use the account's short name (the home folder name).
- macOS may prompt the server-side user the first time — approve local network access if asked.
More in Troubleshooting → Connections.