SSHD can be launched with the -D
or -d
option.
-D:
When this option is specified, sshd will not detach and does not become a daemon.
This allows easy monitoring of sshd.
-d:
Debug mode.
The server sends verbose debug output to standard error, and does not put itself in the background.
The server also will not fork and will only process one connection. This option is only intended for debugging for the server.
Multiple -d options increase the debugging level. Maximum is 3.
I guess your best choice is to run a separate SSHD
process, listening on another port, with the -d
option.
So when the «normal» SSHD fails, you will still be able to switch to the other one, using the alternate port.