Jay Taylor's notes

back to listing index

Aaron Toponce : Making Sense of Hashed Hosts in ~/.ssh/known_hosts

[web search]
Original source (pthree.org)
Tags: SSH hash function known_hosts pthree.org
Clipped on: 2019-01-09

Image (Asset 1/5) alt= |1|F1E1KeoE/eEWhi10WpGv4OdiO6Y=|3988QV0VE8wmZL7suNrYQLITLCg= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgwCZx9lGaY+Zhz98TdWqZ01mTzOwRnQO0EIBM8Hx8olxMbrQ1Xa+x/7LBoGyJqeYFunZbFCVpAu+2SBkvf75qV8nTlq3WXnLnprsH5Sq/c9f29ZCcMHevI

The host name is 192.168.1.61
The following is how to apply the salt/key to get the hashed host name:
$hex_key=$(echo $(echo F1E1KeoE/eEWhi10WpGv4OdiO6Y= | base64 -d | xxd -p));echo $(echo -n 192.168.1.61 | openssl sha1 -mac HMAC -macopt hexkey:$hex_key)|awk '{print $2}'|xxd -r -p|base64
3988QV0VE8wmZL7suNrYQLITLCg=

So, 3988.....Cg= is the hashed value of 192.168.1.61.

  • Derek Smalsl | June 14, 2014 at 12:18 pm | Permalink

    "I don't expect you to follow this post completely, but it's so amazingly cool, I have to blog it." - and the award for most arrogant sentence of the day goes to....YOU!!!!

  • Post a Comment

    Your email is never published nor shared.
    Name
    Email
    Website
    Comment
    © 2019 Aaron Toponce | Thanks, WordPress | Barthelme theme by Scott | Standards Compliant XHTML & CSS | RSS Posts & Comments