What is the proper location for sshd_config?

I'm running both El Capitan and High Sierra on various boxes. I've been doing a lot of systems setup, backup, copying, etc. and wanted to configure password-less operation of ssh between these machines. I understand the process of setting up password-less ssh operations having done this before (on macOS and non-macOS systems) ... and everything I've done so far is working perfectly fine (as far as I can tell) ... but I don't know why it's working!


All the online (macOS) documentation that I read regarding this process mentions tweaks that should be made to the daemon configuration file: /etc/sshd_config However, that file does not exist! I do have the file /etc/ssh/sshd_config (and a whole lot of other stuff in that directory) but no ssh-related files in /etc.


These online sources say that I need to make the following changes to /etc/sshd_config:


RSAAuthentication yes

PubkeyAuthentication yes

PermitRootLogin no

PasswordAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

I've never made a single one of these changes - because there is no /etc/sshd_config in El Capitan or High Sierra - yet everything works as expected. I'm very confused. Can someone enlighten me?


Thanks!

various, Mac OS X (10.4.10)

Posted on Jul 7, 2018 7:53 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 7, 2018 7:17 PM

The sshd daemon reads /etc/ssh/sshd_config. That is the first line in the sshd_config(5) man page description. This location, and filename is identical for El Capitan and High Sierra. In Ubuntu 18.04 LTS, it is /etc/ssh/ssh_config.


When you read online articles, pay close attention to any date when they were posted, as this may indicate a substantially older version of OS X, where the filesystem organization may be different (e.g. /etc/sshd_config), or simply a mistake in the post, when /etc/ssh/sshd_config was intended, but written incorrectly.

Similar questions

1 reply
Question marked as Top-ranking reply

Jul 7, 2018 7:17 PM in response to liam1101

The sshd daemon reads /etc/ssh/sshd_config. That is the first line in the sshd_config(5) man page description. This location, and filename is identical for El Capitan and High Sierra. In Ubuntu 18.04 LTS, it is /etc/ssh/ssh_config.


When you read online articles, pay close attention to any date when they were posted, as this may indicate a substantially older version of OS X, where the filesystem organization may be different (e.g. /etc/sshd_config), or simply a mistake in the post, when /etc/ssh/sshd_config was intended, but written incorrectly.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What is the proper location for sshd_config?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.