public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Can't talk to X server through ssh tunnel after ~ 18 minutes
@ 2011-05-25 17:43 Andrew DeFaria
  2011-05-25 18:02 ` Tim Daneliuk
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew DeFaria @ 2011-05-25 17:43 UTC (permalink / raw)
  To: cygwin; +Cc: cygwin-xfree

I ssh from my Cygwin box to a Linux machine (happens with Solaris 
machines too) and I can run X applications back to Cygwin/X without a 
problem. However, after a few minutes something happens to the tunnel 
and I can no longer put up any X windows:

$ cat checks.sh
#!/bin/bash
while true; do
   date
   xclock &
   sleep 2
   killall xclock
   if [ $? != 0 ]; then
     echo Cannot talk to X Server anymore
   else
     sleep 60
   fi
done
$ checkx.sh
Tue May 24 09:48:43 PDT 2011
./checkx.sh: line 12: 10927 Terminated              xclock
Tue May 24 09:49:45 PDT 2011
./checkx.sh: line 12: 11393 Terminated              xclock
Tue May 24 09:50:47 PDT 2011
b./checkx.sh: line 12: 11592 Terminated              xclock
Tue May 24 09:51:49 PDT 2011
./checkx.sh: line 12: 11782 Terminated              xclock
Tue May 24 09:52:51 PDT 2011
./checkx.sh: line 12: 11977 Terminated              xclock
Tue May 24 09:53:53 PDT 2011
./checkx.sh: line 12: 12161 Terminated              xclock
Tue May 24 09:54:55 PDT 2011
./checkx.sh: line 12: 12345 Terminated              xclock
Tue May 24 09:55:57 PDT 2011
./checkx.sh: line 12: 12534 Terminated              xclock
Tue May 24 09:56:59 PDT 2011
./checkx.sh: line 12: 12723 Terminated              xclock
Tue May 24 09:58:01 PDT 2011
./checkx.sh: line 12: 12912 Terminated              xclock
Tue May 24 09:59:03 PDT 2011
./checkx.sh: line 12: 13142 Terminated              xclock
Tue May 24 10:00:05 PDT 2011
./checkx.sh: line 12: 13345 Terminated              xclock
Tue May 24 10:01:07 PDT 2011
./checkx.sh: line 12: 13578 Terminated              xclock
Tue May 24 10:02:09 PDT 2011
./checkx.sh: line 12: 13843 Terminated              xclock
Tue May 24 10:03:11 PDT 2011
./checkx.sh: line 12: 14074 Terminated              xclock
Tue May 24 10:04:13 PDT 2011
./checkx.sh: line 12: 14260 Terminated              xclock
Tue May 24 10:05:16 PDT 2011
./checkx.sh: line 12: 14455 Terminated              xclock
Tue May 24 10:06:18 PDT 2011
X connection to localhost:15.0 broken (explicit kill or server shutdown).
xclock: no process killed
Cannot talk to X Server anymore

After this I cannot re-establish an X connection until I exit the ssh 
session and ssh back in again. Any ideas?

(I'm gonna post this to both Cygwin and Cygwin-X as I'm not sure if this 
is a problem with ssh or a problem with X).
-- 
<a href="http://defaria.com">Andrew DeFaria</a><br>
<small><font color="#999999">If a man says something in the woods and 
there are no women there, is he still wrong?</font></small>



--
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] 5+ messages in thread

* Re: Can't talk to X server through ssh tunnel after ~ 18 minutes
  2011-05-25 17:43 Can't talk to X server through ssh tunnel after ~ 18 minutes Andrew DeFaria
@ 2011-05-25 18:02 ` Tim Daneliuk
  2011-05-25 23:47   ` Andrew DeFaria
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Daneliuk @ 2011-05-25 18:02 UTC (permalink / raw)
  To: cygwin

On 5/25/2011 12:43 PM, Andrew DeFaria said this:
> I ssh from my Cygwin box to a Linux machine (happens with Solaris machines too) and I can run X applications back to Cygwin/X without a problem. However, after a few minutes something happens to the tunnel and I can no longer put up any X windows:
> 


What arguments are you using to start the ssh session?

--
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] 5+ messages in thread

* Re: Can't talk to X server through ssh tunnel after ~ 18 minutes
  2011-05-25 18:02 ` Tim Daneliuk
@ 2011-05-25 23:47   ` Andrew DeFaria
  2011-05-26 15:38     ` Jon TURNEY
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew DeFaria @ 2011-05-25 23:47 UTC (permalink / raw)
  To: cygwin

On 5/25/2011 11:01 AM, Tim Daneliuk wrote:
> On 5/25/2011 12:43 PM, Andrew DeFaria said this:
>> I ssh from my Cygwin box to a Linux machine (happens with Solaris 
>> machines too) and I can run X applications back to Cygwin/X without a 
>> problem. However, after a few minutes something happens to the tunnel 
>> and I can no longer put up any X windows:
> What arguments are you using to start the ssh session?
The only argument is -X. Like I said, I was able to put up X windows 
through the ssh tunnel. Then, after some, it stops working - consistently.
-- 
Andrew DeFaria <http://defaria.com>
I didn't climb to the top of the food chain to be a vegetarian.


--
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] 5+ messages in thread

* Re: Can't talk to X server through ssh tunnel after ~ 18 minutes
  2011-05-25 23:47   ` Andrew DeFaria
@ 2011-05-26 15:38     ` Jon TURNEY
  2011-05-27  5:10       ` Andrew DeFaria
  0 siblings, 1 reply; 5+ messages in thread
From: Jon TURNEY @ 2011-05-26 15:38 UTC (permalink / raw)
  To: cygwin; +Cc: Andrew.DeFaria

On 26/05/2011 00:47, Andrew DeFaria wrote:
> On 5/25/2011 11:01 AM, Tim Daneliuk wrote:
>> On 5/25/2011 12:43 PM, Andrew DeFaria said this:
>>> I ssh from my Cygwin box to a Linux machine (happens with Solaris machines
>>> too) and I can run X applications back to Cygwin/X without a problem.
>>> However, after a few minutes something happens to the tunnel and I can no
>>> longer put up any X windows:
>> What arguments are you using to start the ssh session?
> The only argument is -X. Like I said, I was able to put up X windows through
> the ssh tunnel. Then, after some, it stops working - consistently.

I'd guess this is something to do with an untrusted xauth cookie with a 20
minute timeout being generated, although exactly how that can happen if you
are using an X server without the SECURITY extension (as Cygwin/X servers have
been built for the past couple of years), I don't quite understand.

See 'ForwardX11Timeout' in 'man ssh_config'

Use 'ssh -Y'

--
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] 5+ messages in thread

* Re: Can't talk to X server through ssh tunnel after ~ 18 minutes
  2011-05-26 15:38     ` Jon TURNEY
@ 2011-05-27  5:10       ` Andrew DeFaria
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew DeFaria @ 2011-05-27  5:10 UTC (permalink / raw)
  To: cygwin



On 05/26/11 08:39, Jon TURNEY wrote:
> On 26/05/2011 00:47, Andrew DeFaria wrote:
>> On 5/25/2011 11:01 AM, Tim Daneliuk wrote:
>>> On 5/25/2011 12:43 PM, Andrew DeFaria said this:
>>>> I ssh from my Cygwin box to a Linux machine (happens with Solaris 
>>>> machines
>>>> too) and I can run X applications back to Cygwin/X without a problem.
>>>> However, after a few minutes something happens to the tunnel and I 
>>>> can no
>>>> longer put up any X windows:
>>> What arguments are you using to start the ssh session?
>> The only argument is -X. Like I said, I was able to put up X windows 
>> through
>> the ssh tunnel. Then, after some, it stops working - consistently.
>
> I'd guess this is something to do with an untrusted xauth cookie with a 20
> minute timeout being generated, although exactly how that can happen 
> if you
> are using an X server without the SECURITY extension (as Cygwin/X 
> servers have
> been built for the past couple of years), I don't quite understand.
>
> See 'ForwardX11Timeout' in 'man ssh_config'
>
> Use 'ssh -Y'
Ah yes. That seems to have done it. Thanks. Interestingly Cygwin has 
this ForwardX11Timeout in man ssh_config but the Linux system doesn't!

Now I need to characterize my problem with the samba serviced shared 
home directory that keeps me from sharing my ~/.ssh/config...
-- 
Andrew DeFaria <http://defaria.com>
How come abbreviated is such a long word?


--
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] 5+ messages in thread

end of thread, other threads:[~2011-05-27  5:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 17:43 Can't talk to X server through ssh tunnel after ~ 18 minutes Andrew DeFaria
2011-05-25 18:02 ` Tim Daneliuk
2011-05-25 23:47   ` Andrew DeFaria
2011-05-26 15:38     ` Jon TURNEY
2011-05-27  5:10       ` Andrew DeFaria

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).