How to Turn On SSH on Mac

Jul 8, 2022 - 1 Comment

Enabling the Mac SSH Server

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:

  1. Pull down the  Apple menu and go to “System Settings”
  2. Open the “General” preference panel”
  3. Go to “General”
  4. Toggle the switch for “Remote Login” to turn on the SSH server on the Mac
  5. 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”
  6. 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:

  1. Pull down the  Apple menu and go to “System Preferences”
  2. Open the “Sharing” preference panel”
  3. Check the box for “Remote Login” to turn on the SSH server on the Mac
  4. Optionally but recommended for anyone wanting to create a full shell experience, check the box for “Allow full disk access for remote users”
    Enable SSH Server on Mac with Remote Login

  5. 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:

  1. Pull down the  Apple menu and go to “System Preferences”
  2. Open the “Sharing” preference panel”
  3. 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.

.

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks

One Comment

» Comments RSS Feed

  1. Betty says:

    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

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site