All Mac computers come with an integrated SSH server that is disabled by default, but it can be activated anytime when remote command line access to the device is needed.
The SSH functionality in MacOS is enabled through a feature called Remote Login. Once Remote Login is turned on, both SSH and SFTP services become available for remote connections to the Mac.
How to Activate the SSH Server on a Mac Running MacOS Ventura 13 or Later
Activating the SSH service in newer MacOS versions involves adjusting settings within the system:
- Click the ? Apple menu and navigate to “System Settings”
- Open the “General” preference panel
- Navigate to “General”
- Toggle the switch labeled “Remote Login” to activate the SSH server
- Optionally, though advised, click the (i) icon to configure user permissions and enable full shell access by selecting “Allow full disk access for remote users”
- The SSH server will start immediately, allowing the Mac to accept incoming SSH connections
How to Enable the SSH Server on a Mac with MacOS Monterey or Older Versions
For earlier MacOS versions, turning on the SSH server is handled via System Preferences:
- Open the ? Apple menu and go to “System Preferences”
- Go to the “Sharing” preference pane
- Tick the checkbox for “Remote Login” to activate the SSH server
- It’s recommended, especially for those seeking full shell capabilities, to also tick the box for “Allow full disk access for remote users”
- The SSH service is now running, and you may connect using any SSH client
You can connect to the Mac from any operating system using its respective SSH client—whether it's Terminal on another Mac, PuTTY on Windows, a terminal on Linux, or an SSH app on iPhone, Android, etc.
Connecting to the Mac Remotely Using SSH
After enabling Remote Login, take note of the IP address shown below the setting. It also displays the exact SSH command syntax to use: “ssh username@IP-address”
For instance, if the username is “Paul” and the IP address is 192.168.0.108, the command would be:
ssh paul@192.168.0.108
This command can be executed in the Terminal app on another Mac or any SSH client across different platforms and devices.
Once logged in, you’re able to perform tasks remotely as if you were directly at the machine.
How to Disable the SSH Server on a Mac
To deactivate the SSH server in macOS, simply disable the feature in the preferences:
- From the ? Apple menu, choose “System Preferences”
- Open the “Sharing” preference panel
- Uncheck “Remote Login” to stop the SSH server
Advanced users may alternatively choose to enable SSH through the command line if preferred. Whether done via the GUI or Terminal, the outcome remains the same—the SSH server on the Mac is now active and ready to handle remote connections.
The above is the detailed content of How to Turn On SSH on Mac. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

You’ve had your Mac for a few years, and you’re starting to feel the effects of your device aging—the battery doesn’t hold up as well as it used to. To avoid getting stuck with a dead Mac, you have no choice but to take your charger e

The Focus Modes functionality comes with several pre-set options such as Work, Driving, Sleep, and users are also free to create custom ones for any scenario imaginable. Should you find yourself not needing a multitude of Focus modes—whether because

If you trust Siri to accurately transcribe your speech into text and send it as a message, you can activate a setting that lets Siri send messages automatically from your iPhone without asking for confirmation first.With the confirmation feature enab

Some users of Mac computers running MacOS Sierra and MacOS High Sierra have reported issues when trying to log in to an Apple ID or iCloud via System Preferences, as well as problems accessing iCloud.com using Safari. In addition, Safari fails to loa

Have you ever received a long audio message on your iPhone and while listening, the screen turns off, interrupting the playback and forcing you to start over? It's pretty frustrating, isn't it?Next time you receive a lengthy voice message on your iPh

iOS 16 is now available for iPhone users, offering a solid update packed with practical features you're sure to enjoy.The most noticeable and exciting addition is the ability to personalize your lock screen. However, there are also plenty of smaller

In this blog post, we’ve gathered the 22 most significant breaches that happened back in 2017. All of the reports were conducted by Chris Vickery — a data breach hunter, who had partnered with MacKeeper to provide repor

Customizing your Mac by renaming it helps set it apart from other devices, especially when using AirDrop, and makes it easier to identify on a network.In macOS Ventura 13 and later versions, the method for changing the computer name has changed compa
