Sign up ×
Information Security Stack Exchange is a question and answer site for information security professionals. It's 100% free, no registration required.

I am trying to SSH into my fresh Ubuntu 12.04 server. At the client I have deleted known_hosts. SSH to the host for the first time has it offering me an ECDSA key to verify. The problem is I know how to get the RSA key and verify it but I don't know how to get the ECDSA key.

How can I force SSH to prompt with the RSA key and store it if I approve?

I have tried:

ssh -o RSAAuthentication=yes user@server

Unfortunately this gives me an ECDSA key and the Are you sure you want to continue connecting (yes/no)? message.

share|improve this question

2 Answers 2

You can also tell the server what algorithm to use from the client (for example if you already have the rsa fingerprint written down and are physically far from the server)

  ssh -oHostKeyAlgorithms='ssh-rsa' host
share|improve this answer
up vote 7 down vote accepted

Don't use RSA since ECDSA is the new default.

On the server do this:

ssh-keygen -l -f /etc/ssh/

and record that number.

On the client you can SSH to the host and if and when you see that same number, you can answer the prompt

Are you sure you want to continue connecting (yes/no)?

affirmatively. Then the ECDSA key will get recorded on the client for future use.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.