Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 79101  / 1 Year ago, sun, may 14, 2023, 6:29:54

Upon the first time accessing a server, how can I force SSH to give me the RSA key and automatically store it if the user approves?



Presently it is offering me the ECDSA key. Because I already know the RSA key, I would prefer to see the RSA key presented at this point.



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.


More From » ssh

 Answers
6

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



On the server do this:
ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub
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.


[#38663] Tuesday, May 16, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tatoethin

Total Points: 377
Total Questions: 110
Total Answers: 98

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;