I have changed some stuff within the sshd_config file and want to reset the file to its default settings. How would I go about doing this?
Asked
Active
Viewed 3.8k times
2 Answers
5
The ssh default config file is on /private/etc/ssh/sshd_config, you can copy it to .ssh directory by the following command
sudo cp /private/etc/ssh/sshd_config ~/.ssh/config
Then restart SSHD:
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
Yuseferi
- 370
- 3
- 6
- 15
-
2Beware. There are 2 configuration files for ssh : `/etc/ssh/ssh_config` which is the configuration for the **client** SSH, and `/etc/ssh/sshd_config` which the configuration for the **server** SSH. – Rich Pauloo May 23 '19 at 20:13
2
If it is for MAC i found this it may be useful
https://gist.github.com/n8felton/91e71a7c64f9f05ed6a5467f9164bb7e
David
- 43
- 5
-
Thank you. You are a life saver. I have been looking everywhere, well almost everywhere, lol – StrangeRanger Sep 21 '17 at 00:02