Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 584  / 3 Years ago, mon, june 14, 2021, 12:35:24

I have setup-ed key based SSH authentication to all the systems. How ever i have missed out few systems. If i taken the address of the added hosts, i can find out the non added hosts address. Is there any command to retreive the added hosts address? Thanks in advance.


Update



  • Output of awk '{print $1}' ~/.ssh/known_hosts can be found here.


More From » ssh

 Answers
1

What you have is a hashed known_hosts file, which is the default. These are one-way hashes of the host|key, so you cannot recover the actual hostname. This is intentional, as knowledge of all the hosts you have accessed and cached keys for (and, perhaps more importantly, knowing which ones you haven't) is fairly valuable to someone who wants to fool you into sharing your passwords with them. Its not enough if you're using SSH keys, as you may do something sensitive while logged in through an attacker's machine.



What you should do is ssh to all your machines, and verify the fingerprint carefully when doing so. Once you have all of them, you can distribute this known_hosts file to the clients that need it. Note that you can put it in /etc/ssh/known_hosts so that all users get it, not just your current user.


[#41550] Monday, June 14, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ncharm

Total Points: 255
Total Questions: 105
Total Answers: 118

Location: Virgin Islands (U.S.)
Member since Sat, May 6, 2023
1 Year ago
;