Solved

OpenSSH Clearing RSA fingerprints ?

Posted on 2011-03-23
3
953 Views
Last Modified: 2012-05-11
Hi,

I'm connecting from my windows box to a remove ubuntu box using putty - SSH session.  When I first connect i get the putty alert about accepting the new server host key and also shows the RSA fingerprint.  I've accept the key so everytime I make a ssh server it works without the prompt and I can login to the linux box

What I want to know is how do I delete this key on the server so when I use my pc to connect  remotely the prompt comes up again.  I've tried to delete the fingerprint id from known_hosts and restart the SSH server but I connected straight away Essentially I want to clear all entries on the server so my PC would be given a new key

The odd thing is even after I've delete all the entries from the Know_hosts file I can still connect via ssh to the server ?   Shouldn't it record a new fingerprint ?

Hope this makes sense Your input would be most appreciated
0
Comment
Question by:Cobraiti
3 Comments
 
LVL 12

Accepted Solution

by:
upanwar earned 500 total points
ID: 35204319
With which user you login to your Linux box, It is root or any other.

Login to your Linux Box and execute below given command.

# vi ~/.ssh/known_hosts  

Now search the hostname or IP of your Windows box in that file and remove that line with dd then save and exit that file.

Here ~ refers to home directory of current user so no matter from which user you have logged in. It will modify that user's known_host file.

There is one more way to achieve your goal.

ssh-keygen -R <Hostname or IP address of your Linux Box>

It will give you message that
known_hosts updated
Original contents retained as known_hosts.old

0
 
LVL 16

Expert Comment

by:gelonida
ID: 35205562
Hm perhaps I don't understand correctly

If you connect from a windows putty client to a server, then you have to clean up on the windows putty client side


putty stores the fingerprints in the windows registry:

look at
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys

See also:
http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html


0
 

Author Closing Comment

by:Cobraiti
ID: 35211204
Thanks. That worked :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sftp message 2 133
IIS and windows 10 5 166
How do I see man for /etc/ssh/sshd_config file? 4 68
MiTM SSH session on a Cisco device talking TACACS+ 1 64
We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now