It is common knowledge that you can start the ssh client with the -v flag, and you get a lot of debugging output on stdout:

ssh -v remote-server.domain.ch

But sometimes, you cannot find an SSH problem with only client-side debugging. For example, I had a weird problem where the file .ssh/authorized_keys was not readable by the sshd daemon because of some weird SELinux permissions. What I tried is to change the systemd file of the sshd daemon. But this is bad advice, because for once when you change the systemd file, and you have some problem with it, then you no longer can ssh from remote to the server. Another problem is that the -d flag of the sshd-daemon is not really compatible with systemd, because it will always exit after one client-connection.

So the best way how to debug SSH problems is actually to start an additional sshd daemon on a different port, with debugging turned on:

# Start additional sshd daemon:
# In the foreground and debugging mode (-d)
# On port 2222
/usr/sbin/sshd -d -p 2222