TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why doesn't SSH implement a 'Perfect hash function' for known hosts

2 pointsby joantuneabout 8 years ago
I know that this is a bit paranoid, but once&#x2F;if you get access to someone&#x27;s computer, you&#x27;re pretty much left with a catalog of other systems that you might have access to in ~&#x2F;.ssh&#x2F;known_hosts My question is: why aren&#x27;t those entries hashed in a way that there are no collisions? if someone wants to verify if the fingerprint is ok, there should be a command that given the domain would print the existing fingerprint (by calculating the hash meanwhile)<p>Ofcourse, the Hash would have to be salted (and&#x2F;or peppered) by system.<p>*Perfect &#x27;hash&#x27; function: https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Perfect_hash_function

1 comment

cjbprimeabout 8 years ago
Huh? known_hosts files <i>are</i> hashed by default.<p>If yours aren&#x27;t, it&#x27;s probably because you have `HashKnownHosts no` in your config somewhere.
评论 #13812890 未加载
评论 #13812957 未加载