User avatar
dbasberg
Posts: 56
Joined: Fri Jul 13, 2012 7:28 pm
Location: Michigan, USA

ssh rsa key problem

Wed Aug 15, 2012 2:35 am

I am installing cygwin sshd on my PC and using RPI to test it. I had to uninstall and re-install cygwin due to a mistake I made. I had reached my PC thru ssh before I re-installed. Now the RPI sees a different RSA key and will not let me login to the PC. How can I get the key corrected or remove keys and start over learning the key from PC sshd server? I hope I was clear enough, but maybe not. I have no Linux experience yet. Thanks for any help. Be glad to clarify problem if asked. Looks like there are quite a few ways to handle ssh security [ confusing to newbies].
Five RPIs: 2:256 & 2:512 and an RPI3 used for monitor and control in out buildings of farm (embedded controls). Linux/Python novice. Experienced real-time programmer/hardware/systems designer (asm, C, C++).

User avatar
nroff-man
Posts: 23
Joined: Mon Jul 30, 2012 7:31 pm
Location: /usr/bin

Re: ssh rsa key problem

Wed Aug 15, 2012 2:52 am

Hi

When you login you should get a message explaining which
line of your known_hosts file the original key exists at.

You can simply edit that file ~/.ssh/known_hosts and delete
the line.

bye.

User avatar
M.M
Posts: 107
Joined: Fri Aug 03, 2012 7:40 am
Location: Hamburg, GER

Re: ssh rsa key problem

Wed Aug 15, 2012 7:15 am

Hi dbasberg,

alternatively, you could use the following command

Code: Select all

 ssh-keygen -f </path/to/your/known_hosts> -R <hostname or IP>
Usually, the "known-hosts" file is located in the user's home folder in a hidden folder named ".ssh"

Regards
"If people read the FAQs the Qs wouldn't be A F, would they?"

User avatar
dbasberg
Posts: 56
Joined: Fri Jul 13, 2012 7:28 pm
Location: Michigan, USA

Re: ssh rsa key problem

Thu Aug 16, 2012 2:24 am

All fixed. Thanks for the help.

Doug :D
Five RPIs: 2:256 & 2:512 and an RPI3 used for monitor and control in out buildings of farm (embedded controls). Linux/Python novice. Experienced real-time programmer/hardware/systems designer (asm, C, C++).

Return to “Beginners”