<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason L. Froebe - Tech tips and How Tos for Fellow Techies &#187; xauth</title>
	<atom:link href="http://froebe.net/blog/index.php/tag/xauth/feed/" rel="self" type="application/rss+xml" />
	<link>http://froebe.net/blog</link>
	<description>Tips &#38; Tricks for Databases (Sybase, Oracle, MySQL, PostgreSQL, SQLite), Windows, Linux, Solaris, Perl, Java, Bash and so much much more</description>
	<lastBuildDate>Sat, 07 Jan 2012 22:12:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Getting &#8220;Xlib: PuTTY X11 proxy: wrong authentication protocol attempted&#8221;?  I have the answer :)</title>
		<link>http://froebe.net/blog/2008/11/14/getting-xlib-putty-x11-proxy-wrong-authentication-protocol-attempted-i-have-the-answer/</link>
		<comments>http://froebe.net/blog/2008/11/14/getting-xlib-putty-x11-proxy-wrong-authentication-protocol-attempted-i-have-the-answer/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 02:00:57 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[MIT-MAGIC-COOKIE]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[su]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[x windows]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xauth]]></category>
		<category><![CDATA[xlib]]></category>
		<category><![CDATA[xterm]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=755</guid>
		<description><![CDATA[Here&#8217;s the scenario: You ssh to a remote server with your login and either sudo or su to another user to run some application that uses a X Windows front end.  There is a firewall between your desktop and the remote server that allows only ssh connections (port 22).  When you run into the error [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the scenario:</p>
<p>You ssh to a remote server with your login and either sudo or su to another user to run some application that uses a X Windows front end.  There is a firewall between your desktop and the remote server that allows only ssh connections (port 22).  When you run into the error &#8220;Xlib: PuTTY X11 proxy: wrong authentication protocol attempted&#8221;.  What to do?</p>
<div class="bash dean_ch"><span class="kw2">ssh</span> jason<span class="sy0">@</span>remote-server <span class="re5">-X</span><br />
jason $ <span class="kw3">echo</span> <span class="re1">$DISPLAY</span><br />
localhost:<span class="nu0">10.0</span><br />
jason $ <span class="kw2">su</span> &#8211; oracle<br />
oracle<span class="st_h">&#8216;s Password:<br />
oracle $ xterm<br />
Xlib: connection to &quot;localhost:10.0&quot; refused by server<br />
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted<br />
xterm Xt error: Can&#8217;</span>t open display: localhost:<span class="nu0">10.0</span></div>
<p>On recent OpenSSH Server releases, you can simply enable &#8220;ForwardX11Trusted yes&#8221; in the /etc/ssh/sshd_config file and restart the OpenSSH server.  If you&#8217;re not using a recent OpenSSH Server release or if you can&#8217;t for security or political reasons, what could you do?  Give up?  It&#8217;s simpler than you think.<br />
You need to temporarily transfer the authorization to the other account.  First, get the key from <strong>your</strong> account:</p>
<div class="bash dean_ch">jason $ xauth list<br />
aspc2o1<span class="sy0">/</span>unix:<span class="nu0">10</span> MIT-MAGIC-COOKIE-<span class="nu0">1</span> bc334c66cfec3c5c3d5b0efc4ee9d3ad</div>
<p>Next, sudo/su to the other account and add the authorization key.</p>
<div class="bash dean_ch">jason $ <span class="kw2">su</span> &#8211; oracle<br />
oracle $ xauth add aspc2o1<span class="sy0">/</span>unix:<span class="nu0">10</span> MIT-MAGIC-COOKIE-<span class="nu0">1</span> bc334c66cfec3c5c3d5b0efc4ee9d3ad</div>
<p>Now, you should be able to start any X Windows application, assuming that your DISPLAY variable is set to go through the ssh tunnel:</p>
<div class="bash dean_ch">oracle $ xterm</div>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/11/14/getting-xlib-putty-x11-proxy-wrong-authentication-protocol-attempted-i-have-the-answer/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
	</channel>
</rss>

