sudo chown root:root /etc/ssh/sshd_config && sudo chmod 600 /etc/ssh/sshd_config

Category: Self-Hosting

sudo chown root:root /etc/ssh/sshd_config && sudo chmod 600 /etc/ssh/sshd_config

Ensure the SSH daemon config is owned by root and not readable by other users

Ensures the SSH config file is owned by root and not readable by other users — prevents local users from reading the SSH configuration.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.