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

148

31

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

pupeno

Posted 2010-02-04T22:35:46.620

Reputation: 8 223

Answers

169

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

pupeno

Posted 2010-02-04T22:35:46.620

Reputation: 8 223

1... and make sure the user is included in "Allow access for" -.- – d4Rk – 2014-11-04T21:55:47.430

46

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).

Nicholaz

Posted 2010-02-04T22:35:46.620

Reputation: 1 479

1To restart ssh, turn Remote login off, and then turn it back on. No restart is required. – AnneTheAgile – 2016-06-07T13:40:47.433

3

Unfortunately, that config file won't allow you to edit the port used. To change the port, see http://serverfault.com/a/67616/102900.

– Tyler Collier – 2013-10-23T17:08:19.087