7

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?

StrangeRanger
  • 583
  • 2
  • 5
  • 16

2 Answers2

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
  • 2
    Beware. 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