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 Remote Login to SSH into your Mac

Network and access
~/tips/tip-macos-remote-login-ssh

System Settings > General > Sharing > Remote Login

Lets you log in to your Mac over SSH or SFTP from another computer.

Every Mac ships with an SSH server; it’s just switched off. Apple calls it Remote Login, and once it’s on you can open a shell on your Mac from another computer or copy files to it with SFTP.

System Settings > General > Sharing > Remote Login

Turn on Remote Login, then click the info button next to it. That’s where the settings that matter live. Under Allow access for, I’d pick Only these users and add just your own account, instead of All users. There’s also a switch called Allow full disk access for remote users. Leave it off unless you need to reach protected folders over SSH; you can always switch it on later.

The same pane shows the exact command to use, right below the Remote Login: On line. From another machine it looks like this:

ssh [email protected]

Use your short account name and the IP address or name of the Mac. With SFTP it works the same way, so a file manager or an sftp client can copy files over that same login.

Apple warns that allowing remote login can make your Mac less secure, and I agree with that. My advice: limit it to your own user, use SSH keys rather than a password where you can, and never forward port 22 on the router to it. To reach my MacBook from outside the house I’d use Tailscale, so the SSH port is never open to the internet. And switch Remote Login off again when you no longer need it.

Further reading: Allow a remote computer to access your Mac (Apple)

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