Proof of Concept MitM Attack
If you want to test your configuration, you can use SSH-MITM, which is an audit server for ssh connections.
install ssh-mitm on linux:
python3 -m venv ~/sshenv
source ~/sshenv/bin/activate
pip install ssh-mitm
Start ssh-mitm and redirect session to a honeypot if publickey authentication failed:
ssh-mitm --remote-host target:22 --fallback-host user:password@honeypot:22
This configuration checks, if the user is allowed to login with publickey authentication. If the user is not allowed, password authentication is used.
If the user is allowed to login with publickey authentication, but no agent was forwarded, ssh-mitm redirects to the honeypot.
Conclusion:
Disclosure: I have developedthe author of SSH-MITM, which is a mitm server for SSH connections. This server is used to verify if the described mitigation strategies can reduce the risk of mitm attacks on ssh. I have also written the patch for PuTTY to mitigate trivial authentications without the trust sigils.