Vérification des fingerprint SSH

Sommaire

Index

Première connexion à SSH

$ ssh laurent@192.168.21.164
The authenticity of host '192.168.21.164 (192.168.21.164)' can't be established.
ECDSA key fingerprint is SHA256:AWEa0Hd+1k0GAzuemRfaLs+CzPIgXXJ9DaoONx6zhZM.
Are you sure you want to continue connecting (yes/no)?

Affichage

Selon la clef à afficher:

ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub

Pour toutes les clefs du serveur:

ssh-keyscan localhost 2> /dev/null | ssh-keygen -l -f -

Ou:

echo  /etc/ssh/*.pub | xargs -n 1 ssh-keygen -lf

Source

Et aussi (source)

Clefs Github

GitHub’s SSH key fingerprints - GitHub Docs

À ne pas faire

Ne pas suivre les instructions données ici : https://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html