How to Enable X Forwarding Over SSH on Gentoo Server

By default, X forwarding does not work on Gentoo server. This is the error you get: X11 forwarding request failed on channel 0 Here is the fix!

Watch Free Movies

Paste the following line to /etc/portage/package.use:

net-misc/openssh X

Emerge openssh again:

$ sudo emerge -av openssh

3. Enable X11Forwarding in /etc/ssh/sshd_config (make the X11Forwarding line look like this):

X11Forwarding yes

Restart the sshd service:

$ sudo /etc/init.d/sshd reload

Now start X forwarding:

$ ssh -X user@host

Scroll to Top