Sample Header Ad - 728x90

Generate hashed name for SSH known_hosts

3 votes
1 answer
4055 views
Is there an easy way to generate hashed hostnames to be added to the ~/.ssh/known_hosts file? I'd like to add a @cert-authority line to the ~/.ssh/known_hosts file. Obviously the ssh-keygen command would not get the CA cert.  I think it also needs a connection to the server, and I'm not sure I can get it to hash a wildcard. So, how would I hash "*.bar.com", for example, so that it can be used in the ~/.ssh/known_hosts file? **Edit**: Having thought about it, hashed wildcards probably can't work, as it would be too difficult for the client to match a wildcard after it has been hashed. But, if I can still get a method to hash a domain without requiring a connection to the server (as ssh-keygen does), that would be great.
Asked by Sam Bull (205 rep)
Jan 12, 2018, 02:12 PM
Last activity: Oct 9, 2022, 03:56 PM