How to know/find out/see my ssh host key
A quick qns, how do i find out or see or know my host key?
I am using putty on a windows and managed to log in to my linux although it screamed for the unknow host key as usual for 1st time log-in. I know nothing will go wrong so I just accepted it. I just installed my linux and didnt do anything to my ssh keys. They may be default keys. It should look like 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a. I believe it should be located at /etc/ssh/ in ssh_host key files but I do not know how to view it. Thanks in advance. |
as root simply cat the file.
For instance... Code:
cat /etc/ssh/ssh_host_rsa_key.pub |
i can see these .pub file in /etc/ssh
ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub I, cat ssh_host_dsa_key.pub, get, e.g. AAAB3NzaSLDHLHKASDG82JKASDH:KLAJSDH/alskfHASLl2lhl12h4kjlhASLDH and so on cat ssh_host_key.pub, get e.g. 1024 35 321657432435731387354 and so on cat ssh_host_rsa_key.pub, get, e.g. AAAAB3NzaC1lahflASLDHSLkjaskDkjaf8207SAKJcash2AKJs and so on How can i view it in this format ? e.g. 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a Because i want to compare it with putty's msg. I am not proficient with hexedecimel and binary thingy, so please forgive me for asking too much. |
Quote:
Code:
ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub |
thanks for the help. :)
|
Quote:
$ ssh-keyscan | ssh-keygen -lf - |
All times are GMT -5. The time now is 12:44 AM. |