Stop MITM on the first SSH connection, on any VPS or cloud provider

25 points by JoachimSchipper


ThinkChaos

This is cool because it can be automated!

As a manual way I've been using the cloud provider's console to confirm the server's SSH fingerprint out of band.
I don't manage that many cloud instances, so having a couple manual steps for provisioning is fine

enpo

An alternative approach if you have automated your DNS zone:

This flow allows the server to keep its private SSH host key without rotating it.

Most DNS providers doesn't allow this kind of granular one time access tokens, but you could have a simple internal web service which validates tokens and then issues API calls on your behalf with a permanent non-scoped token, which the SSH server doesn't have access to.