Skip to content

Commit 716a329

Browse files
author
drduh
authored
Checking ssh host fingerprints update
1 parent a86c477 commit 716a329

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ If you had created a new host key, you'll be asked to verify the new RSA key fin
278278

279279
Check the fingerprint on the server from your previous, existing session:
280280

281-
$ sudo ssh-keygen -lf /etc/ssh/ssh_host_key
281+
$ ssh-keygen -lf /etc/ssh/ssh_host_key.pub
282282
4096 19:de:..:fe:58:3a /etc/ssh/ssh_host_key.pub (RSA)
283283

284284
If `ssh` presents a SHA256 fingerprint:
@@ -288,8 +288,16 @@ If `ssh` presents a SHA256 fingerprint:
288288

289289
Check the fingerprint on the server:
290290

291+
$ ssh-keygen -E sha256 -lf /etc/ssh/ssh_host_key.pub
292+
4096 SHA256:47DEQpj8HBSa+/TImW+6JCeuQfRkm5NMpJWZG3hSuFU no comment (RSA)
293+
291294
$ awk '{print $2}' /etc/ssh/ssh_host_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64
292295
47DEQpj8HBSa+/TImW+6JCeuQfRkm5NMpJWZG3hSuFU
296+
297+
To get the MD5 hash of the key fingerprint:
298+
299+
$ ssh-keygen -E md5 -lf /etc/ssh/ssh_host_key.pub
300+
4096 19:de:..:fe:58:3a /etc/ssh/ssh_host_key.pub (RSA)
293301

294302
Start `tmux` or reconnect to an existing session.
295303

0 commit comments

Comments
 (0)