1833496 Members
2894 Online
110052 Solutions
New Discussion

Re: X forwarding and SSH

 
SOLVED
Go to solution
Jason Martens
Frequent Advisor

X forwarding and SSH

I have been using HP-UX Secure Shell for a while now, and have turned on X forwarding on all of my servers. I just installed two new 11.11 servers, and I can't seem to get the forwarding to work, even though they are configured exactly the same (as far as ssh is concerned at least). The DISPLAY variable IS getting set to localhost:10, but it gives me an error message saying:

The DISPLAY environment variable is set to "localhost:10.0", but
the current configuration won't allow sam to run on that display.


I have also #xhost localhost on my local X server, to no avail...

Thanks for your help!
Jason
Never swap out a tape drive at 3 AM!!!
5 REPLIES 5
Wodisch
Honored Contributor

Re: X forwarding and SSH

Hi Jason,

which version of OpenSSH (or commercial SSH) do you run on those new systems?
OpenSSH > 3.50 does have a few new features concerning X11-forwarding, IIRC...
Did you try an "xhost +" over that connection, first?

FWIW,
Wodisch
Jason Martens
Frequent Advisor

Re: X forwarding and SSH

I am using HP-UX Secure Shell, version 3.10.002. I am using the same version on all of my servers, and am only having the problem on one of the servers. I'm not sure what you're asking about the xhost command, but I have made sure that the host I am connecting from, has granted proper access to allow the remote X session.
Never swap out a tape drive at 3 AM!!!

Re: X forwarding and SSH

Hi Jason,

I have had issues with X forwarding but usually only on systems that I have IPv6 installed on. If that is the case then make sure that /etc/opt/ssh/sshd_conf contains the following line:
X11UseLocalhost no

Another possibility is that it is in fact a sam configuration gone mad, can you forward "xclock" for example?

Tyler Easterling
Andrew Cowan
Honored Contributor
Solution

Re: X forwarding and SSH

Hi Jason,

There can also be problems if the systems are getting conflicting information about their hostnames and IP Addresses. Check that this information matches using ping, nslookup etc.

One really obvious thing can be that if you do "ping localhost" it won't work.

Good luck,
Andrew
Jason Martens
Frequent Advisor

Re: X forwarding and SSH

Thanks for the tip Andrew! I never thought to try pinging localhost, because all of my other dns resolution was working just fine. I think it was a problem with the nsswitch.conf in the end. I was still using the hp_defaults, so I created a new nsswitch.conf, and set hosts to
hosts: dns [NOTFOUND=continue] files

After that, I could resolve localhost, and x forwarding started working!

Thanks!
Never swap out a tape drive at 3 AM!!!