For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > OpenSSH > Identifying SSH Key Fingerprints

Identifying SSH Key Fingerprints

Created by dave. Last edited by dave, 5 years and 194 days ago. Viewed 1,235 times. #1
[edit] [rdf]


When ssh logs pubkey use at login time, it only logs the key fingerprint. We need to figure out which key was used to log in because presumably from that we can figure out who did the login.


Shell code:

  cat ~/.ssh/authorized_keys | while IFS="$(printf "\n")" read key; do 
    echo $key > $p
    echo `ssh-keygen -lf $p` `awk '{print $3}' < $p` | awk '{print $2, $5}'
  rm -f $p

(Based on a comment in one of the answers in >>source)

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt