1

this is not a duplicate of Get SSH fingerprint from remote server securely?

My question is what are the ways to obtain the public-key fingerprint of a remote server.

I have a shared hosting account on GoDaddy and I logged in using SSH, I now want to go to /etc/ssh/ and use ssh-keygen to verify my fingerprint. but in this directory there is only a file for the RSA fingerprint which is pretty weird because why would they put the RSA key for display but not the DSA key?

Maybe this is actually the DSA fingerprint and the ssh-keygen is interpreting it wrong? is there a way to make ssh-keygen interprent it as DSA?

or am I missing something?

2
  • Is it possible your server only has an RSA key? Check your configuration....
    – voretaq7
    Commented Jun 28, 2011 at 17:15
  • no, when I log-in via SSH it tells me that the fingerprint is a DSA fingerprint
    – fiftyeight
    Commented Jun 28, 2011 at 20:55

1 Answer 1

1

It's impossible that ssh-keygen would interpret a key as the wrong type, since the type is encoded in two places of the file; also RSA and DSA keys use different internal structures, so you would get an error message.

  • It could be that there is a ssh_host_dsa_key and you're just missing its .pub counterpart.

  • It could be that sshd is configured to look for keys elsewhere. Check sshd_config:

    grep -i ^hostkey /etc/ssh/sshd_config
    
  • ...or that someone removed the DSA key file but didn't restart sshd.

  • It could be that the server is using a different SSH daemon, not OpenSSH.

  • As a last resort, you can use ssh-keyscan -t dsa localhost > hostkey-dsa.pub and run ssh-keygen -lf on the output file.

2
  • Thanx for the comment! the last option (ssh-keyscan) actually worked! amazing, how did it find the key? can I get the location of the key-file? EDIT: I think i get it, I tell the remote server to connect to itself via ssh and save the public key, am I correct?
    – fiftyeight
    Commented Jul 13, 2011 at 16:33
  • Yes, you're right. Commented Jul 13, 2011 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .