Is there any backup for ssh configuration, to roll back on error?
Solution 1:
There is no need for a fallback configuration if you test your configuration properly, i.e.
- Be connected to the system via SSH
- Change the configuration of the SSH server.
- Test the configuration using the
-t
or-T
option of sshd. - Restart the sshd while still being connected. This will not close the current connection.
- Try to create a second connection to the server. If this fails you still have the active first connection to reinstall and test the previous configuration.