How do you run a ssh server on Mac OS X?


Go to System Preferences -> Sharing, enable Remote Login.

  • ... and make sure the user is included in "Allow access for" -.- – d4Rk Nov 4 '14 at 21:55

In System Preferences under Sharing, there is an option for Remote Login.

This will run sshd at startup (through launchd) and enable SSH access with standard options. To tweak the sshd options, edit /etc/sshd_config (you'll need to do this in a sudo shell or via sudo vi /etc/sshd_config).

  • 2
    Unfortunately, that config file won't allow you to edit the port used. To change the port, see serverfault.com/a/67616/102900. – Tyler Collier Oct 23 '13 at 17:08
  • 1
    To restart ssh, turn Remote login off, and then turn it back on. No restart is required. – AnneTheAgile Jun 7 '16 at 13:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.