I have a server on the internet with an ssh server. I try to configure the ssh (by editing the /etc/ssh/sshd_config
file) After editing I have to restart the ssh. But once I made a typo/syntax error in the file and the ssh server didn't start. I cannot change back because there is no connection to machine.
Is there any way to give a backup config file (which automatically picked on error) or any other way to prevent lock out myself from the server?
The only way that I have found is to connect via FTP, and edit the file, but simple FTP is not secure, and SFTP uses ssh, so this is only an insecure solution.