bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-18 03:51 UTC
[Bug 2626] New: ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 Bug ID: 2626 Summary: ssh 172.10 resolves to ssh 172.0.0.10 Product: Portable OpenSSH Version: 7.3p1 Hardware: 68k OS: Mac OS X Status: NEW Severity: normal Priority: P5 Component: Miscellaneous Assignee: unassigned-bugs at mindrot.org Reporter: rajkipa at yahoo.com Hello Team, I found something weird today, i tried to ssh into a box with the below command, instead of throwing an error it filled the middle to octet with zeros. Looks like ssh is greed and tries to left-pad everything with zero until it gets 4 octets. See the below two examples 1. hostname $/usr/local/bin/ssh -v 172.10 OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016 debug1: Reading configuration data /Users/name/.ssh/config debug1: /Users/name/.ssh/config line 2: Applying options for * debug1: Reading configuration data /usr/local/etc/ssh/ssh_config debug1: Connecting to 172.10 [172.0.0.10] port 22. ^C hostname $ 2. hostname $ssh -v 172 OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /Users/name/.ssh/config debug1: /Users/name/.ssh/config line 2: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to 172 [0.0.0.172] port 22. debug1: connect to address 0.0.0.172 port 22: No route to host ssh: connect to host 172 port 22: No route to host -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-18 04:12 UTC
[Bug 2626] ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dtucker at zip.com.au --- Comment #1 from Darren Tucker <dtucker at zip.com.au> --- This is a feature of gethostbyname and earlier gethostbyaddr interfaces: class.hostnum and the 32bit integer equivalent are deprecated but still valid representations of an IP address. Compare: $ telnet 172.10 Trying 172.0.0.10... $ telnet 1.512 Trying 1.0.2.0... $ perl -le 'print 2**31+1' 2147483649 $ telnet 2147483649 Trying 128.0.0.1... If you really want something to complain about, try this: $ telnet 172.010 Trying 172.0.0.8... That all said, it's not something that OpenSSH has anything to do with. Also: hardware=68k? for real? -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-18 04:14 UTC
[Bug 2626] ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 --- Comment #2 from Darren Tucker <dtucker at zip.com.au> --- (In reply to Darren Tucker from comment #1)> This is a feature of gethostbyname and earlier gethostbyaddrerr, those are both the earlier ones. The current one is getaddrinfo. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-18 04:24 UTC
[Bug 2626] ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-18 04:30 UTC
[Bug 2626] ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 --- Comment #3 from Darren Tucker <dtucker at zip.com.au> --- Looks like this behaviour originated in inet_aton() in 4.2BSD. https://en.wikipedia.org/wiki/Dot-decimal_notation -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2021-Apr-23 04:53 UTC
[Bug 2626] ssh 172.10 resolves to ssh 172.0.0.10
https://bugzilla.mindrot.org/show_bug.cgi?id=2626 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Damien Miller <djm at mindrot.org> --- closing resolved bugs as of 8.6p1 release -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.