public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* openssh-6.5p1-1 don't use address in /etc/hosts
@ 2014-02-01  8:12 Ola Strömfors
  2014-02-01 12:54 ` Corinna Vinschen
  2014-02-02 10:04 ` Ola Strömfors
  0 siblings, 2 replies; 4+ messages in thread
From: Ola Strömfors @ 2014-02-01  8:12 UTC (permalink / raw)
  To: cygwin

Hi,

After upgrading openssh from 6.4p1-1 to 6.5p1-1, ssh to host names
listed in /etc/hosts fails. /etc/hosts is actually a symlink to
/cygdriv/c/Windows/system32/drivers/etc/hosts.

% ssh centaur
getaddrinfo: (null): Name or service not known
ssh: connect to host centaur port 22: No such file or directory

Regards, Ola

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: openssh-6.5p1-1 don't use address in /etc/hosts
  2014-02-01  8:12 openssh-6.5p1-1 don't use address in /etc/hosts Ola Strömfors
@ 2014-02-01 12:54 ` Corinna Vinschen
  2014-02-02 10:04 ` Ola Strömfors
  1 sibling, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2014-02-01 12:54 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

On Feb  1 09:12, Ola Strömfors wrote:
> Hi,
> 
> After upgrading openssh from 6.4p1-1 to 6.5p1-1, ssh to host names
> listed in /etc/hosts fails. /etc/hosts is actually a symlink to
> /cygdriv/c/Windows/system32/drivers/etc/hosts.

Not sure that's the actual reason.  getaddrinfo is a WinSock call
which, probably, never ignores its hosts file.

> % ssh centaur
> getaddrinfo: (null): Name or service not known
> ssh: connect to host centaur port 22: No such file or directory

(null) is the replacement string when printf'ing a NULL pointer as
string.  So it seems ssh called getaddrinfo with a NULL pointer for
node and service.

Can you call `ssh -vvv centaur' and see if the debug output gives
some clue as to what happens?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: openssh-6.5p1-1 don't use address in /etc/hosts
  2014-02-01  8:12 openssh-6.5p1-1 don't use address in /etc/hosts Ola Strömfors
  2014-02-01 12:54 ` Corinna Vinschen
@ 2014-02-02 10:04 ` Ola Strömfors
  2014-02-03 10:18   ` Corinna Vinschen
  1 sibling, 1 reply; 4+ messages in thread
From: Ola Strömfors @ 2014-02-02 10:04 UTC (permalink / raw)
  To: cygwin


On Feb 1 13:54 Corinna Vinschen wrote
> On Feb  1 09:12, Ola Stromfors wrote:
>> Hi,
>>
>> After upgrading openssh from 6.4p1-1 to 6.5p1-1, ssh to host names
>> listed in /etc/hosts fails. /etc/hosts is actually a symlink to
>> /cygdriv/c/Windows/system32/drivers/etc/hosts.
>
> Not sure that's the actual reason.  getaddrinfo is a WinSock call
> which, probably, never ignores its hosts file.
>
>> % ssh centaur
>> getaddrinfo: (null): Name or service not known
>> ssh: connect to host centaur port 22: No such file or directory
>
> (null) is the replacement string when printf'ing a NULL pointer as
> string.  So it seems ssh called getaddrinfo with a NULL pointer for
> node and service.
>
> Can you call `ssh -vvv centaur' and see if the debug output gives
> some clue as to what happens?

    With openssl 6.4 I got this

ssh -vvvv centaur
OpenSSH_6.4, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/olast/.ssh/config
debug1: /home/olast/.ssh/config line 55: Applying options for centaur
debug2: ssh_connect: needpriv 1
debug1: Connecting to centaur [192.168.0.254] port 22.
debug1: Allocated local port 1023.
debug1: Connection established.
...

    With openssl 6.5 I got this

ssh -vvvv centaur
OpenSSH_6.5, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/olast/.ssh/config
debug1: /home/olast/.ssh/config line 55: Applying options for centaur
debug2: ssh_connect: needpriv 1
debug1: Connecting to centaur [192.168.0.254] port 22.
getaddrinfo: (null): Name or service not known
ssh: connect to host centaur port 22: No such file or directory

    I then started to comment out different lines in my .ssh/config file.
    The line that caused the problem was

      UsePrivilegedPort yes

    After removing that lines I got this

ssh -vvvv centaur
OpenSSH_6.5, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/olast/.ssh/config
debug1: /home/olast/.ssh/config line 55: Applying options for centaur
debug2: ssh_connect: needpriv 0
debug1: Connecting to centaur [192.168.0.254] port 22.
debug1: Connection established.
...

/Ola


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: openssh-6.5p1-1 don't use address in /etc/hosts
  2014-02-02 10:04 ` Ola Strömfors
@ 2014-02-03 10:18   ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2014-02-03 10:18 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]

On Feb  2 11:04, Ola Strömfors wrote:
> 
> On Feb 1 13:54 Corinna Vinschen wrote
> >On Feb  1 09:12, Ola Stromfors wrote:
> >>Hi,
> >>
> >>After upgrading openssh from 6.4p1-1 to 6.5p1-1, ssh to host names
> >>listed in /etc/hosts fails. /etc/hosts is actually a symlink to
> >>/cygdriv/c/Windows/system32/drivers/etc/hosts.
> >
> >Not sure that's the actual reason.  getaddrinfo is a WinSock call
> >which, probably, never ignores its hosts file.
> >
> >>% ssh centaur
> >>getaddrinfo: (null): Name or service not known
> >>ssh: connect to host centaur port 22: No such file or directory
> >
> >(null) is the replacement string when printf'ing a NULL pointer as
> >string.  So it seems ssh called getaddrinfo with a NULL pointer for
> >node and service.
> >
> >Can you call `ssh -vvv centaur' and see if the debug output gives
> >some clue as to what happens?
> [...]
>    I then started to comment out different lines in my .ssh/config file.
>    The line that caused the problem was
> 
>      UsePrivilegedPort yes
> 
>    After removing that lines I got this
> [success]

Thanks for tracking this down.  I debugged this on the source level and
it turned out that this is the result of an old Cygwin-related patch
combined with a new generic patch in OpenSSH 6.5.

On non-Cygwin systems, an "UsePrivilegedPort yes" is ignored if the uid
of the caller is not 0 (== root).  On Cygwin "UsePrivilegedPort yes" is
not ignored.

The new generic patch is this:

 * ssh(1): bz#1211: make BindAddress work with UsePrivilegedPort.

This leads to a call to getaddrinfo with hostname and service parameter
set to NULL, if UsePrivilegedPort is set.  The same occurs on non-Cygwin
systems if the user is root.

I'll report this as a bug upstream.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-03 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-01  8:12 openssh-6.5p1-1 don't use address in /etc/hosts Ola Strömfors
2014-02-01 12:54 ` Corinna Vinschen
2014-02-02 10:04 ` Ola Strömfors
2014-02-03 10:18   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).