<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux X11 Connection Rejected Because of Wrong Authentication Error and Solution</title> <atom:link href="http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Peter Flynn</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-62250</link> <dc:creator>Peter Flynn</dc:creator> <pubDate>Thu, 08 Sep 2011 08:52:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-62250</guid> <description>I can ssh to my new RHEL6 server from my Ubuntu 11.04 desktop OK and run X apps in my local display.
But I also have sudo privs, and for a lot of server management I need to be able to run some X apps (eg Emacs) as root. I do this on a lot of other servers running RHEL{4&#124;5} by becoming root, exiting, and running the app, thereby using the sticky-time of the X authentication, eg
$ sudo su -
[my password]
# exit
$ sudo system-config-printer &amp;
$
This doesn&#039;t work on the new machine: I get
X11 connection rejected because of wrong authentication.
I can&#039;t see what I need to change: X11 forwarding is set, and all of the above suggestions.</description> <content:encoded><![CDATA[<p>I can ssh to my new RHEL6 server from my Ubuntu 11.04 desktop OK and run X apps in my local display.</p><p>But I also have sudo privs, and for a lot of server management I need to be able to run some X apps (eg Emacs) as root. I do this on a lot of other servers running RHEL{4|5} by becoming root, exiting, and running the app, thereby using the sticky-time of the X authentication, eg</p><p>$ sudo su -<br
/> [my password]<br
/> # exit<br
/> $ sudo system-config-printer &amp;<br
/> $</p><p>This doesn&#8217;t work on the new machine: I get<br
/> X11 connection rejected because of wrong authentication.</p><p>I can&#8217;t see what I need to change: X11 forwarding is set, and all of the above suggestions.</p> ]]></content:encoded> </item> <item><title>By: Juho</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-59461</link> <dc:creator>Juho</dc:creator> <pubDate>Tue, 17 May 2011 12:46:44 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-59461</guid> <description>Thank you very much! Finally got it working with your help.</description> <content:encoded><![CDATA[<p>Thank you very much! Finally got it working with your help.</p> ]]></content:encoded> </item> <item><title>By: Derek</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-57686</link> <dc:creator>Derek</dc:creator> <pubDate>Sun, 24 Apr 2011 20:21:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-57686</guid> <description>Thank you! I&#039;d ran out of disc space! I can&#039;t believe the answer was this simple! Thanks again.</description> <content:encoded><![CDATA[<p>Thank you! I&#8217;d ran out of disc space! I can&#8217;t believe the answer was this simple! Thanks again.</p> ]]></content:encoded> </item> <item><title>By: Hari</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-57122</link> <dc:creator>Hari</dc:creator> <pubDate>Thu, 07 Apr 2011 19:05:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-57122</guid> <description>@Metajunkie Your understanding of -X and -Y options seems to be exactly opposite of what ssh man page says. If you read the documentation on -X, it says it IS vulnerable to keystroke monitoring, and recommends using -Y option. Per document -Y should be more secure than -X.
Also, from another forum, I solved my issue by adding XAUTHORITY=~/.Xauthority environment variable, so this worked: &quot;XAUTHORITY=~/.Xauthority DISPLAY=localhost:10.0 gnome-terminal&quot; while this: &quot;DISPLAY=localhost:10.0 gnome-terminal&quot; got me an error that the display couldn&#039;t be opened on the client with the server side giving the error &quot; X11 connection rejected because of wrong authentication.&quot;. I hope this information is helpful for someone.</description> <content:encoded><![CDATA[<p>@Metajunkie Your understanding of -X and -Y options seems to be exactly opposite of what ssh man page says. If you read the documentation on -X, it says it IS vulnerable to keystroke monitoring, and recommends using -Y option. Per document -Y should be more secure than -X.</p><p>Also, from another forum, I solved my issue by adding XAUTHORITY=~/.Xauthority environment variable, so this worked: &#8220;XAUTHORITY=~/.Xauthority DISPLAY=localhost:10.0 gnome-terminal&#8221; while this: &#8220;DISPLAY=localhost:10.0 gnome-terminal&#8221; got me an error that the display couldn&#8217;t be opened on the client with the server side giving the error &#8221; X11 connection rejected because of wrong authentication.&#8221;. I hope this information is helpful for someone.</p> ]]></content:encoded> </item> <item><title>By: Eric Garcia</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-57029</link> <dc:creator>Eric Garcia</dc:creator> <pubDate>Sat, 02 Apr 2011 00:55:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-57029</guid> <description>None of the solutions above worked for me, but I was able to create my own tunnel to bypass the built-in ssh X forwarding. This worked like a charm.
From localmachine:
ssh -R 6007:localhost:6000 remotemachine
This creates a port-forward that maps requests to port 6007 on remotemachine to port 6000 on localmachine. The default X server port (:0.0) is shorthand for 6000.
Then on the hostmachine:
export DISPLAY=localhost:7.0
This maps all display requests to port 6007 on the remotemachine
Instead of typing this every time, this can be automated by adding entries to files in  ~/.ssh:
localmachine:~/.ssh/config
Host remotemachine
RemoteForward 6007 localhost:6000
remotemachine:~/.ssh/environment
DISPLAY=localhost:7.0</description> <content:encoded><![CDATA[<p>None of the solutions above worked for me, but I was able to create my own tunnel to bypass the built-in ssh X forwarding. This worked like a charm.</p><p>From localmachine:<br
/> ssh -R 6007:localhost:6000 remotemachine<br
/> This creates a port-forward that maps requests to port 6007 on remotemachine to port 6000 on localmachine. The default X server port (:0.0) is shorthand for 6000.</p><p>Then on the hostmachine:<br
/> export DISPLAY=localhost:7.0<br
/> This maps all display requests to port 6007 on the remotemachine</p><p>Instead of typing this every time, this can be automated by adding entries to files in  ~/.ssh:</p><p>localmachine:~/.ssh/config<br
/> Host remotemachine<br
/> RemoteForward 6007 localhost:6000</p><p>remotemachine:~/.ssh/environment<br
/> DISPLAY=localhost:7.0</p> ]]></content:encoded> </item> <item><title>By: nonye</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-56200</link> <dc:creator>nonye</dc:creator> <pubDate>Tue, 08 Mar 2011 19:29:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-56200</guid> <description>I ran into this same error message trying to ssh -f -Y into a Fedora 14 box using Cygwin. Turns out, after trying all of the solution suggestions above and others found elsewhere, that the problem was the Firewall/Selinux settings on the Fedora box. As they&#039;re local I just disabled both services and now my XWin works super charm.</description> <content:encoded><![CDATA[<p>I ran into this same error message trying to ssh -f -Y into a Fedora 14 box using Cygwin. Turns out, after trying all of the solution suggestions above and others found elsewhere, that the problem was the Firewall/Selinux settings on the Fedora box. As they&#8217;re local I just disabled both services and now my XWin works super charm.</p> ]]></content:encoded> </item> <item><title>By: Phil</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-56149</link> <dc:creator>Phil</dc:creator> <pubDate>Sat, 05 Mar 2011 23:22:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-56149</guid> <description>In my case X11 forwarding always worked. I had no problems until today (even 2 days ago it was working:/). So I followed your instructions. Permissions  X11Forwarding was disabled for some reason. I fixed both ssh_config and sshd_config. Also sshd_config already had X11UseLocahost enabled so I don&#039;t know what&#039;s left to check :s my account owns .Xauthority and everything you mention is fine. The application I am trying to run on Xserver via ssh is gedit and I&#039;m getting the same error even after the changes i made.
error message:
&quot;X11 connection rejected because of wrong authentication.
The application &#039;gedit&#039; lost its connection to the display localhost:13.0;
most likely the X server was shut down or you killed/destroyed
the application.&quot;
does anyone have any other ideas on this?
Thanks</description> <content:encoded><![CDATA[<p>In my case X11 forwarding always worked. I had no problems until today (even 2 days ago it was working:/). So I followed your instructions. Permissions  X11Forwarding was disabled for some reason. I fixed both ssh_config and sshd_config. Also sshd_config already had X11UseLocahost enabled so I don&#8217;t know what&#8217;s left to check :s my account owns .Xauthority and everything you mention is fine. The application I am trying to run on Xserver via ssh is gedit and I&#8217;m getting the same error even after the changes i made.</p><p>error message:<br
/> &#8220;X11 connection rejected because of wrong authentication.<br
/> The application &#8216;gedit&#8217; lost its connection to the display localhost:13.0;<br
/> most likely the X server was shut down or you killed/destroyed<br
/> the application.&#8221;</p><p>does anyone have any other ideas on this?</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: Josh</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-56125</link> <dc:creator>Josh</dc:creator> <pubDate>Fri, 04 Mar 2011 06:57:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-56125</guid> <description>Jockie, thank u!!!
I did have a rc in my ~/.ssh.</description> <content:encoded><![CDATA[<p>Jockie, thank u!!!<br
/> I did have a rc in my ~/.ssh.</p> ]]></content:encoded> </item> <item><title>By: Aleksey Tsalolikhin</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-55453</link> <dc:creator>Aleksey Tsalolikhin</dc:creator> <pubDate>Wed, 09 Feb 2011 06:14:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-55453</guid> <description>Thank you for providing such useful articles!!  The very first check (df) helped me find and fix my problem.  Cheers!  Aleksey</description> <content:encoded><![CDATA[<p>Thank you for providing such useful articles!!  The very first check (df) helped me find and fix my problem.  Cheers!  Aleksey</p> ]]></content:encoded> </item> <item><title>By: Minime</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-55282</link> <dc:creator>Minime</dc:creator> <pubDate>Tue, 01 Feb 2011 05:11:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-55282</guid> <description>Followed your instructions and it worked for me at last. Have been trying to iplement this for the 2 weeks.
Thank you.</description> <content:encoded><![CDATA[<p>Followed your instructions and it worked for me at last. Have been trying to iplement this for the 2 weeks.</p><p>Thank you.</p> ]]></content:encoded> </item> <item><title>By: TuxMac</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-52050</link> <dc:creator>TuxMac</dc:creator> <pubDate>Sat, 11 Dec 2010 20:14:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-52050</guid> <description>Another possibility - if you ssh and immediately see an error about the .Xauthority file (unreadable, not writeable, etc.), try this:
rm .Xauthority
...logout, log back in and then all is well!</description> <content:encoded><![CDATA[<p>Another possibility &#8211; if you ssh and immediately see an error about the .Xauthority file (unreadable, not writeable, etc.), try this:<br
/> rm .Xauthority<br
/> &#8230;logout, log back in and then all is well!</p> ]]></content:encoded> </item> <item><title>By: rpetras</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-49955</link> <dc:creator>rpetras</dc:creator> <pubDate>Wed, 06 Oct 2010 14:34:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-49955</guid> <description>Thanks for this!
Of course I skipped the &quot;Check your drive space&quot; line believing I had lots of space, and went through and checked everything else first, before running a df and seeing that, in fact, I HAD run out of space.
Clearing out an out of control log file fixed the issue in a jiffy.</description> <content:encoded><![CDATA[<p>Thanks for this!</p><p>Of course I skipped the &#8220;Check your drive space&#8221; line believing I had lots of space, and went through and checked everything else first, before running a df and seeing that, in fact, I HAD run out of space.</p><p>Clearing out an out of control log file fixed the issue in a jiffy.</p> ]]></content:encoded> </item> <item><title>By: D. Le</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-48893</link> <dc:creator>D. Le</dc:creator> <pubDate>Thu, 19 Aug 2010 21:12:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-48893</guid> <description>Do this from the machine that you are ssh from:
$ xauth list $DISPLAY
You&#039;ll get something like
machine1:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae
Now ssh to the other machine (machine2) and tell it what the cookie is by adding it to the authentication list.
$ xauth    add    :10 MIT-MAGIC-COOKIE-1 4d22408a71a55b41ccd1657d377923ae
$ echo   $DISPLAY
The echo command should show machine1</description> <content:encoded><![CDATA[<p>Do this from the machine that you are ssh from:</p><p>$ xauth list $DISPLAY</p><p>You&#8217;ll get something like<br
/> machine1:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae</p><p>Now ssh to the other machine (machine2) and tell it what the cookie is by adding it to the authentication list.</p><p>$ xauth    add    :10 MIT-MAGIC-COOKIE-1 4d22408a71a55b41ccd1657d377923ae</p><p>$ echo   $DISPLAY</p><p>The echo command should show machine1</p> ]]></content:encoded> </item> <item><title>By: mteppo</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-48819</link> <dc:creator>mteppo</dc:creator> <pubDate>Mon, 16 Aug 2010 12:14:23 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-48819</guid> <description>Also you could be experiencing this:
http://ubuntuforums.org/showthread.php?t=571809
The fix was to add
--
X11UseLocalhost yes
--
to your /etc/ssh/sshd.config
This did the trick for me - at least.</description> <content:encoded><![CDATA[<p>Also you could be experiencing this:<br
/> <a
href="http://ubuntuforums.org/showthread.php?t=571809" rel="nofollow">http://ubuntuforums.org/showthread.php?t=571809</a></p><p>The fix was to add<br
/> &#8211;<br
/> X11UseLocalhost yes<br
/> &#8211;<br
/> to your /etc/ssh/sshd.config</p><p>This did the trick for me &#8211; at least.</p> ]]></content:encoded> </item> <item><title>By: Metajunkie</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-47957</link> <dc:creator>Metajunkie</dc:creator> <pubDate>Mon, 21 Jun 2010 06:30:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-47957</guid> <description>The -X flag works again, on Mac OS X.  I am running version 10.6.4
I don&#039;t know if it ever wasn&#039;t working, for sure.  But it is working now.  There should be no reason to use the -Y flag (IMHO).  It certainly shouldn&#039;t be your first choice, as the -Y flag enables &quot;trusted&quot; forwarding, which are NOT subjected to the X11 SECURITY extension controls.  This could leave your session vulnerable to keystroke monitoring.
Fly safe - Metajunkie</description> <content:encoded><![CDATA[<p>The -X flag works again, on Mac OS X.  I am running version 10.6.4</p><p>I don&#8217;t know if it ever wasn&#8217;t working, for sure.  But it is working now.  There should be no reason to use the -Y flag (IMHO).  It certainly shouldn&#8217;t be your first choice, as the -Y flag enables &#8220;trusted&#8221; forwarding, which are NOT subjected to the X11 SECURITY extension controls.  This could leave your session vulnerable to keystroke monitoring.</p><p>Fly safe &#8211; Metajunkie</p> ]]></content:encoded> </item> <item><title>By: She0gorath</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-46785</link> <dc:creator>She0gorath</dc:creator> <pubDate>Wed, 07 Apr 2010 16:04:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-46785</guid> <description>I had a problem : when I tried to run a Xorg program, it returned :
-----
ego@Darth-Vader ~ % xcalc
X11 connection rejected because of wrong authentication.
Error: Can&#039;t open display: localhost:10.0
-----
I fixed the problem by add -Y function in my ssh command :
-----
ssh -X -Y user@host
-----
(I&#039;m sorry if my language isn&#039;t clear, I&#039;m not very good in english :/ )</description> <content:encoded><![CDATA[<p>I had a problem : when I tried to run a Xorg program, it returned :<br
/> &#8212;&#8211;<br
/> ego@Darth-Vader ~ % xcalc<br
/> X11 connection rejected because of wrong authentication.<br
/> Error: Can&#8217;t open display: localhost:10.0<br
/> &#8212;&#8211;</p><p>I fixed the problem by add -Y function in my ssh command :<br
/> &#8212;&#8211;<br
/> ssh -X -Y user@host<br
/> &#8212;&#8211;</p><p>(I&#8217;m sorry if my language isn&#8217;t clear, I&#8217;m not very good in english :/ )</p> ]]></content:encoded> </item> <item><title>By: jockie</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-44523</link> <dc:creator>jockie</dc:creator> <pubDate>Mon, 09 Nov 2009 13:19:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-44523</guid> <description>Another issue might be a rc file named either ~/.ssh/rc or /etc/ssh/sshrc. If one of these files is present, it has to handle (given) xauth parameters as well, since sshd won&#039;t execute xauth by itself anymore.</description> <content:encoded><![CDATA[<p>Another issue might be a rc file named either ~/.ssh/rc or /etc/ssh/sshrc. If one of these files is present, it has to handle (given) xauth parameters as well, since sshd won&#8217;t execute xauth by itself anymore.</p> ]]></content:encoded> </item> <item><title>By: leamanc</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-38863</link> <dc:creator>leamanc</dc:creator> <pubDate>Wed, 24 Sep 2008 05:48:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-38863</guid> <description>Vivek, I believe since Mac OS X 10.4, you must use the -Y flag (instead of -X) to enable X11 forwarding.  If I use -X on 10.4 or 10.5, I get the authentication error, but -Y always works.
Not sure why Apple broke convention here, but I think this is the fix you are looking for.</description> <content:encoded><![CDATA[<p>Vivek, I believe since Mac OS X 10.4, you must use the -Y flag (instead of -X) to enable X11 forwarding.  If I use -X on 10.4 or 10.5, I get the authentication error, but -Y always works.</p><p>Not sure why Apple broke convention here, but I think this is the fix you are looking for.</p> ]]></content:encoded> </item> <item><title>By: dot22</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-38803</link> <dc:creator>dot22</dc:creator> <pubDate>Thu, 18 Sep 2008 11:43:57 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-38803</guid> <description>There is a programm - Xming, - that allows run some application from Linux server at Windows desktop.
&quot;Xming may be used with implementations of SSH to securely forward X11 sessions from Unix machines. It supports PuTTY and ssh.exe, and comes with a version of PuTTY&#039;s plink.exe.&quot;
http://en.wikipedia.org/wiki/Xming</description> <content:encoded><![CDATA[<p>There is a programm &#8211; Xming, &#8211; that allows run some application from Linux server at Windows desktop.<br
/> &#8220;Xming may be used with implementations of SSH to securely forward X11 sessions from Unix machines. It supports PuTTY and ssh.exe, and comes with a version of PuTTY&#8217;s plink.exe.&#8221;<br
/> <a
href="http://en.wikipedia.org/wiki/Xming" rel="nofollow">http://en.wikipedia.org/wiki/Xming</a></p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/faq/x11-connection-rejected-because-of-wrong-authentication/#comment-38799</link> <dc:creator>vivek</dc:creator> <pubDate>Thu, 18 Sep 2008 06:29:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=1796#comment-38799</guid> <description>Use Putty Windows ssh client, it has support for X11 forwarding. You also need to install Win32-X11 for local display.</description> <content:encoded><![CDATA[<p>Use Putty Windows ssh client, it has support for X11 forwarding. You also need to install Win32-X11 for local display.</p> ]]></content:encoded> </item> </channel> </rss>
