On 2018-01-23 11:04, Diez Roggisch wrote:
Hi there,

I’m trying to work over SSH with a linux box sitting under my desk.

If I ssh into it (using iTerm2) using

  ssh -X machine

the XQuartz-Application automagically starts, and I can then
subsequently start a X-process on the remote machine.

However, after a while, this ability goes away. In the same session
that has spawned a successful X-session, I get the above mentioned

  Error: Can't open display: localhost:10.0

When using 'ssh -X' (equiv of the ssh_config 'ForwardX11'), OpenSSH will timeout the ability to forward new X11 requests after 20 minutes (by default). You can increase this with the ssh_config option ForwardX11Timeout (either in /etc/ssh/ssh_config or ~/.ssh/config, read about this option in the ssh_config(5) man page).

The other option would be to use 'ssh -Y' (equiv of the ssh_config 'ForwardX11Trusted', which does not have a timeout.

The idea here is that X11 has a horrible security model, and even over ssh, it is possible for someone to read and/or write to/from your X11 session over the socket that is opened. Forwarding X11 over ssh protects the stream over the wire, but not the sockets on each end. The default X11 forwarding considers the remote host to be 'untrusted' and puts a time limit on how long it will forward new X11 requests. If you 'trust' the remote host and users on it, using the -Y/ForwardX11Trusted option to disable the timeout.

As I understand it, logging out of the remote host and logging in again, as well as restarting X11 altogether, *should* have allowed new requests, but I have seen that not solve it as well.

<snip>

--
Michael Parson
Pflugerville, TX
KF5LGQ

_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription: 
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to