Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 12-25-2007, 10:13 PM   #1
Registered: Dec 2007
Posts: 97

Rep: Reputation: 15
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.
Old 12-25-2007, 10:40 PM   #2
Senior Member
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 71
as root simply cat the file.
For instance...
cat /etc/ssh/
The public keys are the ones that will show up in the known_hosts file. cat the other public keys to check them out as well...
Old 12-25-2007, 11:22 PM   #3
Registered: Dec 2007
Posts: 97

Original Poster
Rep: Reputation: 15
i can see these .pub file in /etc/ssh

I, cat, get, e.g.

cat, get e.g.
1024 35 321657432435731387354 and so on

cat, get, e.g.
AAAAB3NzaC1lahflASLDHSLkjaskDkjaf8207SAKJcash2AKJs and so on

How can i view it in this format ? e.g.

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.
Old 12-25-2007, 11:40 PM   #4
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
Originally Posted by khaos83 View Post
How can i view it in this format ? e.g.
Actually, that is a public key "fingerprint", not the entire key. You can view your server's fingerprints by running the following commands:
ssh-keygen -l -f /etc/ssh/

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

ssh-keygen -l -f /etc/ssh/
Old 12-26-2007, 03:35 AM   #5
Registered: Dec 2007
Posts: 97

Original Poster
Rep: Reputation: 15
thanks for the help.


server, sshd, sshkeygen

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
open-ssh vs. commercial ssh (tru64), public-key auth not possible? cf050 Linux - Networking 8 03-28-2012 11:15 AM
ssh Host Key ziox Linux - Networking 6 02-07-2005 02:57 PM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 05:28 PM
to 2.6.10 from 2.4.26 | ssh client | Host key verification failed kaN5300 Slackware 6 01-05-2005 10:04 PM
SSH rejects my host key for version 2 only. Travis86 Linux - Networking 19 08-08-2003 03:48 AM

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration