How to Turn On SSH on Mac
All Macs have a bundled SSH server that is disabled by default, but can be turned on at any time if you’d like to grant remote command line access to a machine.
The SSH server in MacOS is turned on by using a sharing feature called Remote Login. With Remote Login enabled, the Mac now has SSH and SFTP available to it for remote connections.
How to Enable the SSH Server on a Mac with MacOS Ventura 13 or Newer
Turning on the macOS SSH server is done through a settings adjustment in the latest versions of MacOS system software:
- Pull down the Apple menu and go to “System Settings”
- Open the “General” preference panel”
- Go to “General”
- Toggle the switch for “Remote Login” to turn on the SSH server on the Mac
- Optionally but recommended, click the (i) button to customize user access and to create a full shell experience, by checking the box for “Allow full disk access for remote users”
- The SSH server starts immediately, and the Mac is able to receive inbound SSH connections
How to Enable the SSH Server on a Mac with MacOS Monterey or Earlier
Turning on the macOS SSH server is done through system preferences in earlier versions of MacOS:
- Pull down the Apple menu and go to “System Preferences”
- Open the “Sharing” preference panel”
- Check the box for “Remote Login” to turn on the SSH server on the Mac
- Optionally but recommended for anyone wanting to create a full shell experience, check the box for “Allow full disk access for remote users”
- The SSH server has started, you’re free to connect to the Mac using any SSH client
You can connect to the Mac with any SSH client from any operating system, whether it’s another Mac with Terminal, Windows PC with PuTTY, Linux with a terminal, iPhone or Android with an SSH app, Android with an SSH app, or anything else with an SSH client.
Connecting to the Mac via SSH
Once you enable Remote Login, pay attention to the text underneath it to see what the IP address is of that Mac. Helpfully, it even provides the command line syntax to use in the Terminal application to initiate the remote SSH connection: “ssh username@IP-address”
For example, if the IP is 192.168.0.108 and the username is “Paul” the command would look like:
ssh paul@192.168.0.108
You can enter that into the Terminal application on another Mac, or any other SSH client no matter the operating system or device.
Of course once you login you’re
How to Turn Off the SSH Server on a Mac
Disabling the SSH server in macOS is as simple as turning the feature off in preferences:
- Pull down the Apple menu and go to “System Preferences”
- Open the “Sharing” preference panel”
- Uncheck the box for “Remote Login” to turn off the Mac SSH server
More advanced MacOS users can also enable SSH from the command line if they’d prefer to go that route. Whether you use the System Preference panel or the Terminal, the result is the same – the Mac now has an active SSH server running, ready to receive inbound connections.
Tip: I have had Mac for years, but is not an advanced operator. When I see OXDaily on an issue it would be helpful if the author can cater to a person like me too. For example; it would be nice if an acronym is used, like SSH to give some explanation of what it means for a person like me.
Thanks
Betty