LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2012, 09:00 AM   #16
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,843

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309

yes, but in a terminal window, or in a console, or during the boot, or? Have you looked at the log of ssh and sshd? try to increase the log level (DEBUG). I still do not know if ssh was really successful and you can log in with it. Also I would like to see the config of ssh and sshd, maybe something is not set correctly. There a lot of things to check and actually there is no info to work with.
 
Old 05-19-2012, 09:16 AM   #17
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Original Poster
Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I'm SSHing from a terminal in XFCE. Both machines are logged into XFCE desktops.
I've attached sshd_config and ssh_config though I've made no changes to ssh_config and use the -X option to forward X. I'm not sure how to start the server with debugging on and where to look for the information it gives.
Attached Files
File Type: txt ssh_config.txt (1.6 KB, 144 views)
File Type: txt sshd_config.txt (2.4 KB, 152 views)

Last edited by 273; 05-19-2012 at 09:20 AM.
 
Old 05-19-2012, 10:18 AM   #18
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,843

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
You can set the log by adding this to the config (both sides):
LogLevel DEBUG
Gives the verbosity level that is used when logging messages from ssh(1). The possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and
DEBUG3. The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of verbose output.
 
Old 05-19-2012, 10:55 AM   #19
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Original Poster
Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Well, xauth is being called as I see the following on my netbook when I connect:
Code:
Running /usr/bin/xauth remove PC:10.0
/usr/bin/xauth add PC:10.0 MIT-MAGIC-COOKIE-1 41a73f4528c5b746ebcc6e788e0e820e
I'm not seeing anything else related to X in the output at either end apart from when trying to run xclock I receive the same error on the netbook of:
Code:
Error: Can't open display: PC:10.0
 
Old 06-10-2012, 08:27 AM   #20
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Original Poster
Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
It turns out ifupdown was missing after an update, so re-installing it fixed this.
 
Old 08-01-2012, 03:54 AM   #21
dr_agon
Member
 
Registered: Sep 2007
Location: Poland
Distribution: Ubuntu LTS
Posts: 105
Blog Entries: 12

Rep: Reputation: 26
I had similar problem. Thanks for all the hints.

I had to add "X11UseLocalhost no" do sshd_config, which removed the error during ssh connection.
Then the problem with "Can't open display: ..." appeared despite the $DISPLAY variable was set properly, and netstat reported no port 6010.
I have found out that I had no 'lo' interface (only ethN) configured. Adding it allowed proper opening of port :6010 which was missing.

Maybe proper setting up / enabling / diabling INET6 addresses would also do the trick, but I'm fine with my solution
 
Old 07-30-2014, 08:59 PM   #22
fr2000
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Let me solve all your issues with this............

The X11 Forwarding is effected by disabling IP6 in the Network configuration and not removing all of the IP6 host references. If IP6 is active as in openSUSE 13.1, and you disable IP6, X11 no longer forwards. If your reactivate IP6 then it works again.

I believe you have to remove all references in Hostnames so that is can properly find the IP4 addresses properly when X11 checks.

I think that will solve almost all issues with X11 forwarding from several web sites that I have seen which at no time has this been discussed. Also if X11 has a setting which uses IP6 forwarding and you disable it, you may also need to turn that off so it defaults to IP4 use.

I hope this helps.
 
Old 07-31-2014, 11:45 AM   #23
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Normally, X doesn't support TCP connections (it usually lacks encrypted sessions, so the authentication is unprotected). It uses local domain sockets in /tmp/.X11-unix/<display number>.

Thus xhost+ does nothing special, except allow any other local user to connect to your X session. It doesn't do anything for remote connections.

sshd establishes its own authentication on the remote (sshd) side. That is where it uses "localhost" or the local host name for a network name. If you have "X11UseLocalHost no" then it will use the host name. If that host name isn't in the /etc/hosts file (or a DNS entry) then it will fail (no IP number available to use for forwarding). If you have "X11UseLocalHost yes", then it will use 127.0.0.1 for the IP number (which should work), followed by the 6000+"X11DisplayOffset" (for the first attempt. If error, it adds one and tries again).

The major advantage "localhost" has is that it helps prevent remote attacks - they must be local attacks instead.

Personally, I think sshd should use domain sockets instead - but that limits using a ssh connection from being a possible network collection point for multiple OTHER connections on the remote network.
 
1 members found this post helpful.
Old 04-07-2015, 11:58 AM   #24
MattPie
LQ Newbie
 
Registered: Jan 2005
Location: Maryland, USA
Posts: 5

Rep: Reputation: 2
xauth

You will also get this message if you don't have X packages installed on the remote system. "ssh -v -X hostname" will mention something like "xauth not found". On RHEL6 (CentOS6, etc.), the only change required to fix this message is to 'yum groupinstall "X Window System"' on the remote system. There's probably a smaller set o packages that could be use to fulfil the requirements, but that's the easiest.
 
Old 04-07-2015, 04:16 PM   #25
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by MattPie View Post
You will also get this message if you don't have X packages installed on the remote system. "ssh -v -X hostname" will mention something like "xauth not found". On RHEL6 (CentOS6, etc.), the only change required to fix this message is to 'yum groupinstall "X Window System"' on the remote system. There's probably a smaller set o packages that could be use to fulfil the requirements, but that's the easiest.
It should be in the package xorg-x11-xauth. That is the only thing in there, but it will pull in any X libraries that may be necessary.
 
  


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
[SOLVED] X11 forwarding failed doublealice Linux - Newbie 13 11-08-2018 10:54 AM
ssh -L '>channel 3: open failed: connect failed:' Luke771 Linux - Networking 14 01-24-2012 03:14 AM
[SOLVED] PTY allocation request failed on channel 0 sycamorex Slackware 1 01-30-2011 05:55 AM
PTY allocation request failed on channel 0 nice88 Linux - Server 4 12-14-2010 05:44 PM
x11 forwarding over ssh mantonr Linux - Software 1 07-15-2008 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:12 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