Bug 1194

Summary: .host is known, .00host isn't ... or is it?
Product: Portable OpenSSH Reporter: andrew brennan <andrew.brennan>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: normal CC: djm
Priority: P2    
Version: 3.8.1p1   
Hardware: All   
OS: All   

Description andrew brennan 2006-06-09 05:44:31 AEST
I've checked the reported bugs and there are similar notes, but nothing that matched this specifically.  Host key verification seems to match in known_hosts against what was entered, but the error message when there is no match might be misunderstood when the destination was entered as an IP address, using a non-standard (but legal) format.

~/.ssh/known_hosts might have a listing:

10.8.1.1 ssh-rsa AAAAB3Nza...

... but if you were to ssh to 10.8.001.001 you will see a notice like:

The authenticity of host '10.8.001.001 (10.8.1.1)' can't be established.

... assuming that you don't also have 10.8.001.001 in your known_hosts.  Making this match both the entered address and the () value might be a solution, but it could well break something else.
Comment 1 Darren Tucker 2006-06-10 10:31:55 AEST
Host key verification happens against whatever hostname the user enters (or alternatively, whatever they specify with HostKeyAlias) and, optionally, against the IP address which the hostname resolves to.

Why do you want to specify IP addresses with leading zeros anyway?  Do you realise that on some platforms that will cause those components to be interpretted as octal, so sometimes "10.0.0.10" != "10.0.0.010" ?
Comment 2 Damien Miller 2007-05-17 23:03:14 AEST
This could be done, but I don't see any reason to add special-case code to normalise hand-edited IP addresses in known_hosts. If you don't edit the addresses, it will work fine.
Comment 3 Damien Miller 2008-04-04 09:55:33 AEDT
Close resolved bugs after release.