LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-22-2018, 10:17 PM   #1
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Rep: Reputation: 89
ssh + x11 forwarding not working on BLFS


Like the title says I have not been able to get X forwarding working for the case that BLFS is acting as the server. I have verified that:

X was installed when ssh was compiled
X11Forwarding is set to 'yes' in /etc/ssh/sshd.conf
The port used by ssh is opened in iptables

and I get the following when running "ssh -p <port> -Y user@ipaddress"

Code:
X11 forwarding request failed on channel 0
but I do get logged in. This message seems not to why it failed. I get this with BLFS versions 8.2, 7.9, and 7.5 acting as the server, so something must be missing. Any suggestions?
 
Old 05-24-2018, 07:28 PM   #2
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
Well after running ssh in verbose mode it seems it cannot find 'xauth.' For stock BLFS installations this is in /usr/bin - seems pretty straightforward. But not straightforward is a seemingly undocumented sshd option -

After adding
Code:
XAuthLocation /usr/bin/xauth
to /etc/ssh/sshd_config, it finally works.

In verbose mode it still warns me that xauth isn't found, which probably indicates that ssh is looking somewhere else first and then parsing the config file.

I'd hardly call this a 'solution' because an out-of-the-box installation shouldn't require "undocumented" options. I've never had to do this for any other distribution in the past.
 
Old 05-30-2018, 07:02 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
See this:
Code:
--with-xauth=/usr/bin/xauth: Set the default location for the xauth binary for X authentication. Change the location if xauth will be installed to a different path. This can also be controlled from sshd_config with the XAuthLocation keyword. You can omit this switch if Xorg is already installed.
At the bottom of the openssh page here:

http://www.linuxfromscratch.org/blfs...s/openssh.html

Last edited by Keith Hedger; 05-30-2018 at 07:03 AM. Reason: added link
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh X11 forwarding the_gripmaster Linux - Security 3 07-21-2011 04:26 AM
X11 Forwarding using ssh back2games Linux - Desktop 2 03-06-2009 08:45 PM
Need help forwarding X11 via SSH buckwheat12 Linux - Networking 15 05-02-2007 03:08 PM
X11 forwarding with ssh rhermsen Slackware 2 10-27-2006 01:49 PM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration