Files
firestuff/2006-02-07-why-is-my-ssh-x-window-forwarding-broken.html

39 lines
1.4 KiB
HTML
Raw Normal View History

<!--# set var="title" value="Why is my SSH X Window forwarding broken?" -->
<!--# set var="date" value="February 7, 2006" -->
<!--# include file="include/top.html" -->
<p>SSH into your destination:</p>
<pre><code>ssh -vv -X &lt;hostname&gt;
</code></pre>
<p>If you see a line near the end that says “<em>debug1: Remote: No xauth program; cannot forward with spoofing.</em>“, you need to install xauth and reconnect. In Debian, run:</p>
<pre><code>apt-get install xbase-clients
</code></pre>
<p>Next, ensure that youre getting a DISPLAY variable through:</p>
<pre><code>echo $DISPLAY
</code></pre>
<p>If that command outputs just a blank line, X forwarding is probably being denied by the server. Edit your sshd_config (/etc/ssh/sshd_config on Debian) and change/add the line:</p>
<pre><code>X11Forwarding yes
</code></pre>
<p>If you change this, youll need to restart your SSH server:</p>
<pre><code>/etc/init.d/ssh restart
</code></pre>
<p>Once your DISPLAY is being passed correctly, some programs may run but act oddly (”Gdk-error: […] BadAtom”, etc.) SSH uses “SECURITY” extensions by default, and some programs dont work correctly with them. Try:</p>
<pre><code>ssh -Y &lt;hostname&gt;
</code></pre>
<p>Note that this command may expose your local machine to compromise if someone malicious is in control of the host youre connecting to.</p>
<!--# include file="include/bottom.html" -->