ssh -X (-Y) not working

Karl Pearson karlp at ourldsfamily.com
Wed Sep 24 01:29:48 UTC 2008


On Tue, 23 Sep 2008, Bob McClure Jr wrote:

> On Tue, Sep 23, 2008 at 02:28:44PM -0600, Karl Pearson wrote:
>> On Tue, 23 Sep 2008, Bob McClure Jr wrote:
>>
>>> On Tue, Sep 23, 2008 at 01:06:37PM -0600, Karl Pearson wrote:
>>>> I like remote managing my server using ssh -X or ssh -Y and then running
>>>> gui apps sometimes.
>>>>
>>>> I've check workstation and server X11Forwarding yes and then restarted
>>>> sshd so don't know where else to go.
>>>>
>>>> I've checked the logs and there's nothing about it. The error I get is:
>>>>
>>>> [root at mail root]# system-config-printer
>>>> system-config-printer: could not open display
>>>> This is a graphical application and requires DISPLAY to be set.
>>>>
>>>> or:
>>>>
>>>> [karlp at mail ~/]$ xterm
>>>> xterm Xt error: Can't open display:
>>>> xterm: DISPLAY is not set
>>>>
>>>> Of course, the obvious is to set $DISPLAY, which doesn't work either.
>>>
>>> Well, no, it needs to be set by sshd.  If you "ssh -X host.onthe.net",
>>> when you get a shell prompt, you should be able to
>>>
>>> $ echo $DISPLAY
>>> localhost:10.0
>>
>> Nope, it's empty...
>
> Figgers.
>
>>> in the usual case.  Any problems should be evident in
>>> /var/log/messages or /var/log/secure.
>>
>> Logging in works, and the logs show that, but there's nothing about
>> forwarding anomalies. There is an entry about DNS lookup failed for my IP.
>> Should I set secure forwarding on?
>
> I guess so. <shrug>  Can't say I know what that does.  I think I've
> always set it.
>
>>> Check also your ~/.Xauthority file on the distant server.  Permissions
>>> should be something like mine:
>>>
>>> -rw------- 1 bob users 532 Sep 23 15:09 .Xauthority
>>>
>>> You might try deleting it, then exit, and "ssh -X" in again.  It
>>> should mention something about creating it.
>>
>> Deleted. And... not recreated on next ssh in... Hmmm?
>
> Just thought I'd check.  I was suspecting that the file had somehow
> acquired bogus permissions or ownership and couldn't be written to.
>
> Oh, I don't know why I failed to suggest this before.  Turn on
> verbosity with "-v", up to three times to get more details on what's
> going on.  When they say "verbose", they mean _verbose_.  You'll have
> to scroll up to see the whole mess.  See if any clues come of that.

Verbose output shows debug1: Sending environment

but echo $DISPLAY still shows nothing (it shows :0.0 on localhost before 
ssh)

>
>>>> I've seen blogs, threads and other stuff all over the net and everything
>>>> says, enable X11Forwarding. I've done this for years and have never had
>>>> that not work. Using -X or -Y should even countermand that setting if it's
>>>> off, right?
>>>>
>>>> Any ideas where to go next?
>>>>
>>>> ---
>>>>     _/  _/      _/      _/_/_/       ____________   __o
>>>>    _/ _/       _/      _/    _/     ____________  _-\\<._
>>>>   _/_/        _/      _/_/_/                     (_)/ (_)
>>>>  _/ _/       _/      _/           ......................
>>>> _/   _/ arl _/_/_/  _/ earson    KarlP at ourldsfamily.com
>>>> ---
>>>> http://consulting.ourldsfamily.com
>>>> ---
>>>
>>> Cheers,
>>> --
>>> Bob McClure, Jr.
>>
>> ---
>>      _/  _/      _/      _/_/_/       ____________   __o
>>     _/ _/       _/      _/    _/     ____________  _-\\<._
>>    _/_/        _/      _/_/_/                     (_)/ (_)
>>   _/ _/       _/      _/           ......................
>>  _/   _/ arl _/_/_/  _/ earson    KarlP at ourldsfamily.com
>> ---
>> http://consulting.ourldsfamily.com
>> ---
>
> Cheers,
> --
> Bob McClure, Jr.             Bobcat Open Systems, Inc.
> bob at bobcatos.com             http://www.bobcatos.com
> "A new command I give you: Love one another. As I have loved you, so
> you must love one another. By this all men will know that you are my
> disciples, if you love one another."  John 13:34-35 (NIV)
>
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request at redhat.com
> Subject: unsubscribe
>

---
       _/  _/      _/      _/_/_/       ____________   __o
      _/ _/       _/      _/    _/     ____________  _-\\<._
     _/_/        _/      _/_/_/                     (_)/ (_)
    _/ _/       _/      _/           ......................
   _/   _/ arl _/_/_/  _/ earson    KarlP at ourldsfamily.com
---
http://consulting.ourldsfamily.com
---




More information about the Redhat-install-list mailing list