Re: Domain name suffix woes

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Thu, Mar 2, 2017 at 10:46 PM, Martin Rys <spleefer90@xxxxxxxxx> wrote:
[...]
> `ssh user@330` - That gets me an error:
> ssh: connect to host 330 port 22: Invalid argument
>
> I'm assuming that when the hostname is pure number, it ignores domain
> suffix. As just a number cannot be an actual IP, could this behavior be
> fixed in OpenSSH?

not really, the behaviour in question is in they system libraries,
which think it's an IP address (single numeric, number.number and
octal are all valid but uncommon representations of IP addresses).

$ gethostip localhost
localhost.localdomain 127.0.0.1 7F000001

$ gethostip 330
330 0.0.1.74 0000014A

$ telnet 330
Trying 0.0.1.74...
telnet: connect to address 0.0.1.74: Invalid argument

You can work around it with an entry in ~/.ssh/config:

Host 300
   Hostname 330.blah.domain.com

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux