From 5b2518b3fe635372c43e60a315bae7363b2616fb Mon Sep 17 00:00:00 2001 From: Alex Balgavy Date: Sun, 8 Sep 2019 23:32:13 -0400 Subject: [PATCH] ssh-keygen: add commands to print the fingerprint --- cheat/cheatsheets/ssh-keygen | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cheat/cheatsheets/ssh-keygen b/cheat/cheatsheets/ssh-keygen index 2dd64d9..739527f 100644 --- a/cheat/cheatsheets/ssh-keygen +++ b/cheat/cheatsheets/ssh-keygen @@ -12,3 +12,9 @@ ssh-keygen -p -P old_passphrase -N '' -f /path/to/keyfile # To generate a 4096 bit RSA key with a passphase and comment containing the user and hostname ssh-keygen -t rsa -b 4096 -C "$USER@$HOSTNAME" -P passphrase + +# To print the fingerprint of a public key +ssh-keygen -lf /path/to/keyfile + +# To print the Github-style (MD5) fingerprint of a public key +ssh-keygen -E md5 -lf /path/to/keyfile