Bug#1069236: openssh-server: X over ssh fails with "cannot open display"

allan <[email protected]>
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <CALXqfmt60xgE7b1wOb+g92LmyRO0X7QnfkC6TtNsZt6na=WTrg__23888.5928689101$1713870571$gmane$org@mail.gmail.com>
I'm not using a hostname with ssh, I'm sshing directly to an IPv4 address.

*How* was it disabled?  net.ipv6.conf.all.disable_ipv6 = 1 in /etc/sysctl.conf

My point is that "AddressFamily any" should not fail to set $DISPLAY
if IPv6 is not available.

On Tue, Apr 23, 2024 at 5:38 AM Jonathan Dowland <[email protected]> wrote:
>
> On Thu, Apr 18, 2024 at 06:33:00AM -0500, allan wrote:
> > Resolved the issue by editing /etc/ssh/sshd_config and changing
> > #AddressFamily any
> > to
> > AddressFamily inet
>
> This is not a reasonable change to make to the default configuration,
> because it would mean that ssh did not work out of the box in IPv6
> environments.
>
> On Thu, Apr 18, 2024 at 07:53:52AM -0500, allan wrote:
> > More info - IPv6 is disabled on all four machines.  I think
> > "AddressFamily any" should have supported an IPv4 connection.
>
> *How* is it disabled? More information will be needed to figure out
> exactly what's gone on in your environment.
>
> I speculate that the hostnames you were trying to connect to were
> resolving as IPv6 addresses, and the connection failing because the
> hosts are rejecting IPv6 traffic. If that's right, the ultimate fix
> is to correct whatever name resolution is giving you the wrong
> addresses in your environment.
>
> If you are prepared to experiment, we might be able to drill down and
> check that. If so, can you
>
> 1) reverse the sshd_config change you made on at least one of the
>    hosts, and restart that sshd
>
> 2) assuming the troublesome host is named "myhost" in your environment
>    (substitute as appropriate), from your client machine, report the
>    result of running
>
>     getent hosts myhost
>     dig +short myhost
>     nslookup myhost
>     ping -c 1 myhost
>
>     (one or more of these commands may not exist on your machine)
>
> 2) re-attempt to connect from your client, this time passing -vv or
>    -vvv, and capture the logging output
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.