PuTTY using a different localhost than specifiedFrom: sgerarde...@gmail.comNewsgroups:
Wed, 9 Oct 2019 19:30 UTC
View all headers
Re: PuTTY using a different localhost than specifiedFrom: Grant TaylorNewsgroups:
Thu, 10 Oct 2019 03:23 UTC
View all headers
On 10/9/19 1:30 PM, email@example.com wrote:
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".
I hope that helps.
Grant. . . .
unix || die
Re: PuTTY using a different localhost than specifiedFrom: Per HedelandNewsgroups:
Fri, 11 Oct 2019 14:42 UTC
View all headers
In article <firstname.lastname@example.org>
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:
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
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
(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.