I recently misconfigured an ssh file while messing with ciphers, knocking down remote control until I could access the computer locally and fix it. I was wondering if there was a way to prevent this type of problem in the future by running a script to replace the sshd_config file with a safe version upon a signal (non-ssh, obviously) being sent. I can write the script, what I'm looking for is a way to execute it remotely, with as little extra software as possible. I've previously set up something like this using apache to host php that runs bash scripts, but it seems to me that there should be a more elegant solution. This is relatively secure, assume that security won't be an issue. Thanks!
Test SSH configuration without risking losing remote access
ssh;testing
One brute force option is to start a second SSH server running on a different port. If you screw up the main one, just log in on the backup.Obviously remember to disable the backup once you've finished testing :-)