Re: (Almost Solved) Re: How to get new RSA key in known_hosts file?
On Thu, 24 May 2012 22:10:15 -0700
Marc Shapiro <marcnshap@gmail.com> wrote:
> On 5/24/12, Celejar <celejar@gmail.com> wrote:
> > On Thu, 24 May 2012 20:24:49 -0700
> > Marc Shapiro <marcnshap@gmail.com> wrote:
>
> >> How do I manually enter the rsa key, or get ssh to do so, so that I
> >> can connect again?
> >
> > Issue 'ssh-keygen -R your_hostname_or_ip_address'
> >
> > Then try reconnecting.
>
> That got me connected, after answering 'yes' to a few prompts, but...
> When I now try to connect, I get the following:
>
> Warning: the RSA host key for 'xxxxxx' differs from the key for the IP
> address '192.168.1.2'
> Offending key for IP in /home/xxx/.ssh/known_hosts:2
> Matching host key in /home/xxx/.ssh/known_hosts:3
> Are you sure you want to continue connecting (yes/no)? yes
You can get rid of this by doing the above ssh-keygen command for both
the ip address and hostname of the remote box.
> xxx@xxxxxx's password:
> Linux xxxxxx 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686
>
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
>
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> Last login: Thu May 24 21:14:27 2012 from new-host-3.home
> mns@xander:~$
>
>
>
> As you can see, it does connect me, but only after requiring me to
> answer a prompt and enter my password. I don't think that I needed to
> enter my password before. Password authentication was disabled for
? If your keys are properly set up, you should be automatically logged
in.
> security purposes.
This doesn't make sense; if the sshd is instructed to disable password
authentication, then if the key isn't available, the login should just
fail.
> Marc
Celejar
Reply to: