Mailing List Archive

Keysize mismatch error on host key
I've got a problem that I'm hoping the list can help with, otherwise ...

Heres the problem, I've got OpenSSH 1.2.2p1 running on my Intel Linux
box as the secure server. I can connect from another Intel Linux box
using scp and it all seems to work fine.

Another box tries to connect and it gets a warning about the host
keysize not matching. I'm thinking this could be some byte swapping
issue because this box is running Solaris 2.6. This Solaris box is using
the EGD script for its random stuff, if that makes a difference. Anyone
have any ideas on where to start looking ? I'm willing to chase it
down.

I tried modifing the known_hosts file as the warning suggests to no
avail.

Heres the output of what I'm seeing:

The authenticity of host 'xxx.somewhere.net' can't be
established.
Key fingerprint is 1024
28:b0:37:af:d4:ec:09:1f:fb:4f:5e:47:e8:fb:b1:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxx.somewhere.net,1.1.1.1'
to the list
of known hosts.
Warning: /usr/guest/.ssh/known_hosts, line 1: keysize
mismatch for host
xxx.somewhere.net: actual 1048 vs. announced 1024.
Warning: replace 1024 with 1048 in
/usr/guest/.ssh/known_hosts, line 1.
Warning: /usr/guest/.ssh/known_hosts, line 1: keysize
mismatch for host
1.1.1.1: actual 1048 vs. announced 1024.
Warning: replace 1024 with 1048 in
/usr/guest/.ssh/known_hosts, line 1.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now
(man-in-the-middle attack)!
It is also possible that the host key has just been changed.
Please contact your system administrator.
Add correct host key in /usr/guest/.ssh/known_hosts to get
rid of this
message.
Host key for xxx.somewhere.net has changed and you have
requested strict
checking.
lost connection

Tim Farrell tfarrell-t@futuristics.net ( remove the -t to use this
address )
Re: Keysize mismatch error on host key [ In reply to ]
On Fri, 17 Mar 2000, Tim G. Farrell wrote:

> I've got a problem that I'm hoping the list can help with, otherwise ...
>
> Heres the problem, I've got OpenSSH 1.2.2p1 running on my Intel Linux
> box as the secure server. I can connect from another Intel Linux box
> using scp and it all seems to work fine.

What version of OpenSSL are you running on the Linux box?

These errors are often symptomatic of a OpenSSL version mismatch.

-d

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)
Re: Keysize mismatch error on host key [ In reply to ]
Thanks for the reply Mate.

Problem is that scp puts that entry in there as part of its processing.
Is there a way to prevent scp from updating the known_host file
altogether ? Through config maybe ? I'll look into that. But if I side
step it this way can I be sure it won't choke on the next key lookup for
the identity of the sender ? I'll get back to list with the results.

Thanks

Tim

Mate Wierdl wrote:
>
> So why not just delete the appropriate entry from the the local
> known_hosts file?
>
> Mate
> On Fri, Mar 17, 2000 at 07:06:27PM -0500, Tim G. Farrell wrote:
> > I've got a problem that I'm hoping the list can help with, otherwise ...
> >
> > Heres the problem, I've got OpenSSH 1.2.2p1 running on my Intel Linux
> > box as the secure server. I can connect from another Intel Linux box
> > using scp and it all seems to work fine.
> >
> > Another box tries to connect and it gets a warning about the host
> > keysize not matching. I'm thinking this could be some byte swapping
> > issue because this box is running Solaris 2.6. This Solaris box is using
> > the EGD script for its random stuff, if that makes a difference. Anyone
> > have any ideas on where to start looking ? I'm willing to chase it
> > down.
> >
> > I tried modifing the known_hosts file as the warning suggests to no
> > avail.
> >
> > Heres the output of what I'm seeing:
> >
> > The authenticity of host 'xxx.somewhere.net' can't be
> > established.
> > Key fingerprint is 1024
> > 28:b0:37:af:d4:ec:09:1f:fb:4f:5e:47:e8:fb:b1:c8.
> > Are you sure you want to continue connecting (yes/no)? yes
> > Warning: Permanently added 'xxx.somewhere.net,1.1.1.1'
> > to the list
> > of known hosts.
> > Warning: /usr/guest/.ssh/known_hosts, line 1: keysize
> > mismatch for host
> > xxx.somewhere.net: actual 1048 vs. announced 1024.
> > Warning: replace 1024 with 1048 in
> > /usr/guest/.ssh/known_hosts, line 1.
> > Warning: /usr/guest/.ssh/known_hosts, line 1: keysize
> > mismatch for host
> > 1.1.1.1: actual 1048 vs. announced 1024.
> > Warning: replace 1024 with 1048 in
> > /usr/guest/.ssh/known_hosts, line 1.
> > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> > @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
> > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> > IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
> > Someone could be eavesdropping on you right now
> > (man-in-the-middle attack)!
> > It is also possible that the host key has just been changed.
> > Please contact your system administrator.
> > Add correct host key in /usr/guest/.ssh/known_hosts to get
> > rid of this
> > message.
> > Host key for xxx.somewhere.net has changed and you have
> > requested strict
> > checking.
> > lost connection
> >
> > Tim Farrell tfarrell-t@futuristics.net ( remove the -t to use this
> > address )
> >
>
> --
> ---
> Mate Wierdl | Dept. of Math. Sciences | University of Memphis

--
Tim Farrell Futuristics, Inc email: tfarrell@futuristics.net
Senior Suite 200 voice: (724) 934-9750
Software 9500 Brooktree Rd. fax: (724) 934-9780
Engineer Wexford, PA 15090
http://www.futuristics.net

Tomorrow's results today!
Re: Keysize mismatch error on host key [ In reply to ]
Its OpenSSL version 0.9.5 on both the Linux and Solaris sides of the
connection. If theres something better to run, let me know.

Could the identity files cause an error like this, even though its
talking about the known_hosts file ? I wonder. I supplied the identity
files to the other side of the connection, mostly to make it easier for
them. Maybe they got currupted in transmition.

Damien Miller wrote:
>
> On Fri, 17 Mar 2000, Tim G. Farrell wrote:
>
> > I've got a problem that I'm hoping the list can help with, otherwise ...
> >
> > Heres the problem, I've got OpenSSH 1.2.2p1 running on my Intel Linux
> > box as the secure server. I can connect from another Intel Linux box
> > using scp and it all seems to work fine.
>
> What version of OpenSSL are you running on the Linux box?
>
> These errors are often symptomatic of a OpenSSL version mismatch.
>
> -d
>
> --
> | "Bombay is 250ms from New York in the new world order" - Alan Cox
> | Damien Miller - http://www.mindrot.org/
> | Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)

--
Tim Farrell Futuristics, Inc email: tfarrell@futuristics.net
Senior Suite 200 voice: (724) 934-9750
Software 9500 Brooktree Rd. fax: (724) 934-9780
Engineer Wexford, PA 15090
http://www.futuristics.net

Tomorrow's results today!
Re: Keysize mismatch error on host key [ In reply to ]
On Mon, 20 Mar 2000, Tim G. Farrell wrote:

> Its OpenSSL version 0.9.5 on both the Linux and Solaris sides of the
> connection. If theres something better to run, let me know.

OpenSSL 0.9.5 works fine for me and most others who have tried it.

> Could the identity files cause an error like this, even though its
> talking about the known_hosts file ? I wonder. I supplied the identity
> files to the other side of the connection, mostly to make it easier for
> them. Maybe they got currupted in transmition.

Check for linebreaks and other junk that may have got in there.

Perhaps it would be easier to delete the offending lines and allow
an normal ssh connection to fetch the public keys again (after checking
the fingerprints, of course)

-d

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)