LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2010, 01:51 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question ssh X apps as root


When I SSH another machine and try to execute some GUI app, it does. But when I try to execute some app as root on a remote PC, it doesn't do and says:
Code:
X11 connection rejected because of wrong authentication.
[some-GUI-app]: Cannot open display:
How do I make it work?
 
Old 12-26-2010, 01:55 PM   #2
phpdba
LQ Newbie
 
Registered: Sep 2009
Distribution: OpenSuSE & Centos
Posts: 8

Rep: Reputation: 0
There are a few questions I would ask. On the machine you are trying to run a GUI app that you cannot, are you able to login directly as root or do you have to su to root? Do you have X11 forwarding turned on in the /etc/ssh/sshd_config file? Although I don't personally recommend it, do you have PermitRootLogin Yes on that same machine?
 
Old 12-26-2010, 02:04 PM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Do you have X11 forwarding turned on in the /etc/ssh/sshd_config file?
Yes, I do.

Quote:
On the machine you are trying to run a GUI app that you cannot, are you able to login directly as root or do you have to su to root?
OK. I have a machine A and I'm trying to ssh the B machine. On the A machine I can type in "su" and get root privileges. I can also type in "su -", it also works. If I go to tty1 and login as "root" that also does.

Quote:
Although I don't personally recommend it, do you have PermitRootLogin Yes on that same machine?
You mean the B machine?
Here's the B's sshd_config:
Code:
$ cat /etc/ssh/sshd_config | grep -i PermitRootLogin
PermitRootLogin yes # (put yes here if you want root login)
# the setting of "PermitRootLogin without-password".
So I guess it's turned on.
 
Old 12-26-2010, 02:27 PM   #4
phpdba
LQ Newbie
 
Registered: Sep 2009
Distribution: OpenSuSE & Centos
Posts: 8

Rep: Reputation: 0
Hmmm...how are you exporting the display? Are you using putty to connect or is this a straight connect using xhosts to allow the display to show up on the other machine? I tend to cheat and use vncserver in the Centos world.
 
Old 12-27-2010, 01:15 AM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
I connect from Linux to Linux with
Code:
$ ssh host@IP
and don't export anything. Should I?
 
Old 12-27-2010, 01:21 AM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
See if this helps,

http://tldp.org/HOWTO/XDMCP-HOWTO/ts.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root terminal has different bash config when I ssh in vs su from another ssh account stardotstar Linux - General 4 07-01-2010 07:24 PM
Forward OS/X apps over ssh? djeikyb Linux - Software 1 03-25-2008 02:39 AM
run X apps in ssh jaymoney Linux - General 4 06-01-2007 02:09 PM
starting graphic apps from ssh xymian Linux - Software 2 09-23-2005 06:00 AM
Apps through SSH hardknox Linux - Newbie 6 10-07-2004 01:38 PM


All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration