Gentoo Server – Enable X Forwarding over SSH

By | 2013/04/08

If running Gentoo as a server, X forwarding might not be working. The typical error you will see is: X11 forwarding request failed on channel 0 Here is the fix!

1. Add the following to /etc/portage/package.use:

net-misc/openssh X

This will pull in the needed X packages.

2. Next, emerge openssh (again):

$ sudo emerge -av openssh

3. Enable the following in /etc/ssh/sshd_config:

X11Forwarding yes

4. Restart sshd:

$ sudo /etc/init.d/sshd reload

You are all set! Now you can issue tack X for X forwarding:

$ ssh -X user@host


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.