If you've been given a public ssh host key and want to verify it before adding it permanently to your ssh known_hosts file:
Get the public ssh key:
$ ssh-keyscan -p 22 -t rsa,dsa {remote_host} > /tmp/ssh_host_rsa_dsa_key.pubGet the ssh key fingerprint:
$ ssh-keygen -l -f /tmp/ssh_host_rsa_dsa_key.pub











Post new comment