Having Problems with X11 Forwarding and root
Mark Phillips
mark at phillipsmarketing.biz
Thu Apr 19 22:19:32 MST 2018
I agree with the rabbit hole concept. I am finding that for my application,
vnc4server/vnc4viewer/xfce works a lot better than simple X11 forwarding
over ssh.
Thanks for all the help!
Mark
On Thu, Apr 19, 2018 at 7:56 PM, James Mcphee <jmcphe at gmail.com> wrote:
> This works if you've enabled root logins via ssh. If you're forced to
> disable remote root logins, like I am, it takes a bit more bouncing
> around. You may or may not require the -Y, though the programs I'm using
> do not and the security team frowns upon using it. Effectively, the
> difference (on systems where ForwardX11Trusted no) is straight -X only
> forwards the window, whereas -Y gives you access to all of the X
> extensions. Some apps don't work or are wonky without trusted x11
> forwarding. As you can see, it's a deep rabbit hole, and dependent on the
> environment you're operating in. Praise unix for giving us options!
>
> On Thu, Apr 19, 2018 at 5:06 AM, <kitepilot at kitepilot.com> wrote:
>
>> I just do:
>> ssh -fCXY root at turboviking /usr/bin/gnome-calculator
>> And get my banana... :)
>> ET
>>
>>
>> Mark Phillips writes:
>>
>>> There is an application I need to run as root on my Linode server, but it
>>> has to run in a gui.
>>> I have ssh and X11 forwarding set up between my Ubuntu 14.04 system and
>>> my
>>> Linode (swordfish). It works just great for a non-root user (xcalc,
>>> xconsole, the application I need to run, etc). However, when I try to run
>>> the application on the server as root, I get the error message "X11
>>> connection rejected because of wrong authentication." For xcalc running
>>> as
>>> root, I get
>>> X11 connection rejected because of wrong authentication.
>>> Error: Can't open display: swordfish:10.0
>>> I have tried all sorts of google solutions - copying the user's
>>> .Xauthority
>>> to /root/ (also changing the ownership and permissions). But I just can't
>>> seem to log into swordfish as a normal user using ssh -X, su to root, and
>>> get the X11 forwarding to work.
>>> I also went so far as to install vnc4server on the Linode, xfce window
>>> manager, and vnc4viewer on my Ubuntu machine. That all works when I
>>> access
>>> the vnc server as a normal user, but I can't get any X11 apps to run as
>>> root (ie from a root command line in a terminal in the vnc window). The
>>> error message when I try to run xcalc or other X11 apps is "No protocol
>>> specified. Can't open display :1".
>>> What are the special Linux guru magical incantations/spells to make X11
>>> forwarding work for root?
>>> Thanks!
>>> Mark
>>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>
>
>
> --
> James McPhee
> jmcphe at gmail.com
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20180419/35fc95a2/attachment.html>
More information about the PLUG-discuss
mailing list