Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Premature optimization is the root of all evil. -- D. E. Knuth


computers / comp.security.ssh / Re: PuTTY using a different localhost than specified

SubjectAuthor
* PuTTY using a different localhost than specifiedsgerardengle
+- Re: PuTTY using a different localhost than specifiedGrant Taylor
`- Re: PuTTY using a different localhost than specifiedPer Hedeland

1
Subject: PuTTY using a different localhost than specified
From: sgerarde...@gmail.com
Newsgroups: comp.security.ssh
Date: Wed, 9 Oct 2019 19:30 UTC
X-Received: by 2002:ad4:4b09:: with SMTP id r9mr5566498qvw.121.1570649451754;
Wed, 09 Oct 2019 12:30:51 -0700 (PDT)
X-Received: by 2002:a0c:ea46:: with SMTP id u6mr5610320qvp.83.1570649451135;
Wed, 09 Oct 2019 12:30:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no2132253qtl.0!news-out.google.com!q23ni91qtl.1!nntp.google.com!o24no2132240qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.security.ssh
Date: Wed, 9 Oct 2019 12:30:50 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=153.104.35.43;
posting-account=3fzbogoAAABOI3VHrpks4zPQhToesDoQ
NNTP-Posting-Host: 153.104.35.43
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
Subject: PuTTY using a different localhost than specified
From: sgerarde...@gmail.com
Injection-Date: Wed, 09 Oct 2019 19:30:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Hello,

I have students that are using PuTTY for X-forwarding from a remote Linux cluster. They specify the X display location as localhost:0.0, but whenever they try ti display a new window or graphic, they keep getting an error that localhost:20.0 or localhost:17.0 can't be connected to.

Is there some other setting that I'm missing, or a file somewhere that is redirecting to a different localhost address?

Thank you.


Subject: Re: PuTTY using a different localhost than specified
From: Grant Taylor
Newsgroups: comp.security.ssh
Organization: TNet Consulting
Date: Thu, 10 Oct 2019 03:23 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.security.ssh
Subject: Re: PuTTY using a different localhost than specified
Date: Wed, 9 Oct 2019 21:23:47 -0600
Organization: TNet Consulting
Lines: 34
Message-ID: <qnm887$urt$1@tncsrv09.home.tnetconsulting.net>
References: <bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
NNTP-Posting-Host: alpha.home.tnetconsulting.net
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: tncsrv09.home.tnetconsulting.net 1570677831 31613 198.18.18.251 (10 Oct 2019 03:23:51 GMT)
X-Complaints-To: newsmaster@tnetconsulting.net
NNTP-Posting-Date: Thu, 10 Oct 2019 03:23:51 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.8.0
In-Reply-To: <bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
Content-Language: en-US
View all headers
On 10/9/19 1:30 PM, sgerardengle@gmail.com wrote:
Hello,

Hi,

I have students that are using PuTTY for X-forwarding from a remote Linux cluster. They specify the X display location as localhost:0.0, but whenever they try ti display a new window or graphic, they keep getting an error that localhost:20.0 or localhost:17.0 can't be connected to.

Is there some other setting that I'm missing, or a file somewhere that is redirecting to a different localhost address?

I have no idea if it's what you're getting hit by or not, but I've been hit by something quite similar.

TL;DR:  localhost is ambiguous when you have IPv4 and IPv6 on the client and / or server.

Work around:  explicitly specify "127.0.0.1" or "::1" instead of the name "localhost".

Thank you.

You're welcome.

I hope that helps.



--
Grant. . . .
unix || die


Subject: Re: PuTTY using a different localhost than specified
From: Per Hedeland
Newsgroups: comp.security.ssh
Date: Fri, 11 Oct 2019 14:42 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: per...@hedeland.org (Per Hedeland)
Newsgroups: comp.security.ssh
Subject: Re: PuTTY using a different localhost than specified
Date: 11 Oct 2019 14:42:11 GMT
Lines: 58
Message-ID: <h0bim3Ff3j1U1@mid.individual.net>
References: <bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
X-Trace: individual.net hNN7H7E9ATuBtyBWyNfZ7gQRdC6gZgDL2Y59ouoLtiSvz2/yPs
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:q+DZFcorkWaqWufV0G/xRyph2pw=
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: per@hedeland.org (Per Hedeland)
View all headers
In article <bc9c0562-0e81-4b7d-a79a-128fef7cc81f@googlegroups.com>
sgerardengle@gmail.com writes:

I have students that are using PuTTY for X-forwarding from a remote
Linux cluster. They specify the X display location as localhost:0.0, but
whenever they try ti display a new window or graphic, they keep getting
an error that localhost:20.0 or localhost:17.0 can't be connected to.

Those different values are to be expected - the SSH server listens on
a TCP port that must be different from the ones used by any X servers
running on that host, and different from the ones used by other X
forwardings. The OpenSSH server has a config parameter for it:

  X11DisplayOffset
       Specifies the first display number available for sshd(8)'s X11
       forwarding.  This prevents sshd from interfering with real X11
       servers.  The default is 10.

So, the first SSH connection with X forwarding will make the SSH
server set the environment $DISPLAY to localhost:10.0, which
corresponds to TCP port 6010 on the server host, the next one
localhost:11.0 / port 6011 and so on. X clients started on the server
host will connect to the SSH server according to $DISPLAY, the
connection is forwarded to the SSH client, which connects to the
actual X server, typically based on the $DISPLAY setting on the client
host.

And I think *this* is where your problem is - I'm not familiar with
PuTTY, but I assume that's where you specify "localhost:0.0". IMHO,
this shouldn't be needed, PuTTY should at least by default use the
$DISPLAY setting - and localhost:0.0, which means "connect to TCP port
6000", probably doesn't work, since the X server doesn't listen for
TCP connections by default.

In fact I can reproduce your problem with the OpenSSH client, which
*only* uses $DISPLAY. With my default setting of $DISPLAY, i.e.
":0.0", which means "connect via unix domain socket", X forwarding
works just fine, but

client $ export DISPLAY=localhost:0.0
client $ ssh -X server
....
server $ xterm
connect localhost port 6000: Connection refused
xterm: Xt error: Can't open display: localhost:12.0
server $

(The first line is from the OpenSSH client, failing to connect to
"localhost:0.0", while the second one is from xterm on the server.)

Is there some other setting that I'm missing

Try not specifying an X display for PuTTY at all, maybe it will then
use $DISPLAY - or, check your $DISPLAY value (probably ":0.0"), and
specify that for PuTTY.

--Per Hedeland



1
rocksolid light 0.7.2
clearneti2ptor