1834345 Members
2146 Online
110066 Solutions
New Discussion

Problem with ssh

 
SOLVED
Go to solution
marc seguin
Regular Advisor

Problem with ssh

I have openssh (v3.7.1p2) and openssl (v0.9.7c)
on my HP UX-11i.
I use PuTTY to connect to my HP server from my PC, with "X11 forwarding" enabled.

If I execute "xclock", i can see the clock window on my PC. But If i execute "xterm", i have the error message (on HP server) :
Xlib: connection to "localhost:10.0" refused by server
Xlib: Authentication failed at PuTTY X11 proxy
Error: Can't open display: localhost:10.0
Error: Couldn't find per display information

Please help...
thanks
11 REPLIES 11
Bharat Katkar
Honored Contributor

Re: Problem with ssh

Try doing this:
#xhosts + (on HP server)
#export DISPLAY=:0.0

then execute:
#xterm
You need to know a lot to actually know how little you know
marc seguin
Regular Advisor

Re: Problem with ssh

Dear Bharat,

DISPLAY is already well configured because it is possible to send a window to my PC (the xclock window). It looks like something to do with Xlib but I don't know anything about that.
Lee Hundley
Valued Contributor

Re: Problem with ssh

It could also have something to do with the X server on your PC. FWIW, I've seen instances where certain apps won't run because of an incomplete implementation on the PC's X Server. IE: "RENDER extension missing". Then again, I've no personal experience with PuTTY's X11 Forwarding.
It is my firm belief that it is a mistake to hold any firm beliefs
Mel Burslan
Honored Contributor

Re: Problem with ssh

if you are running, on your pc, something like reflexion X, it is really strange that you see the xclock but not the xterm. But if you are running a little known x-server, like winaxe (which I unfortunately was using at one time in history) or some other home/usergroup brew xserver, see Lee Hundley's comment. Some xserver implementations are realyy halfbaked and good for nothing most of the time.

also, on the server side, are you really sure that the DISPLAY variable is set and your xterm command does not have a -d directive to specify the display as localhost. Because, from the error messages, it seems like your hpux server is trying to launch the xterminal on itself instead of your PC.

hth
________________________________
UNIX because I majored in cryptology...
Dave Hutton
Honored Contributor

Re: Problem with ssh

I found this doing a google search:


10.12 "Authentication failed at PuTTY X11 proxy"
This error is reported when PuTTY is doing X forwarding. It is sent back to the X application running on the SSH server, which will usually report the error to the user.

When PuTTY enables X forwarding (see section 3.4) it creates a virtual X display running on the SSH server. This display requires authentication to connect to it (this is how PuTTY prevents other users on your server machine from connecting through the PuTTY proxy to your real X display). PuTTY also sends the server the details it needs to enable clients to connect, and the server should put this mechanism in place automatically, so your X applications should just work.

A common reason why people see this message is because they used SSH to log in as one user (let's say "fred"), and then used the Unix su command to become another user (typically "root"). The original user, "fred", has access to the X authentication data provided by the SSH server, and can run X applications which are forwarded over the SSH connection. However, the second user ("root") does not automatically have the authentication data passed on to it, so attempting to run an X application as that user often fails with this error.

If this happens, it is not a problem with PuTTY. You need to arrange for your X authentication data to be passed from the user you logged in as to the user you used su to become. How you do this depends on your particular system; in fact many modern versions of su do it automatically.

It's part of the putty documention.

marc seguin
Regular Advisor

Re: Problem with ssh

Thanks to all, but it doesn't solve my problem.

Mel, yes I use Reflexion X. And the DISPLAY variable looks OK, because PuTTY sets it to the Server name, but with a different display number (see Dave's note).
And when I try to launch xterm, I do "xterm &". Is it possible that a "-d" option could be hidden ?

Dave, I know about the "su' problems. It can be solved with "xauth list" and "xauth add" commands. But for me, I don't change the user.

Note : It looks like only xterm has problems. I am able to get SAM and other graphic applications (Networker, Veritas Manager) on my PC display.
marc seguin
Regular Advisor

Re: Problem with ssh

Lee, I didn't forget what you said.
About my X server (Reflexion X) on my PC : I know that I can get an xterm window from another HP server.
I just tested it a few minutes ago.

So now i am going to compare the two configurations.

I'll let you know if I find something...
Mel Burslan
Honored Contributor

Re: Problem with ssh

It may be a hidden -d directive somewhere.
you said there is a system which can display on to this reflexion X running windows workstation, which eliminates the misconfiguration of the x server on the PC

while the successful terminal displaying on your screen, do a ps -ef | grep xterm and at the same time run the same command in an endless loop, capturing output to a file while you try starting up the xterm from the system with failures. Exemplifying:

sys1 : where it runs and displays fine
sys2 : where it errors out

on sys1:
export DISPLAY=a.b.c.d:0.0
xterm
ps -ef | grep xterm (after the xterminal displays on your workstation)


on sys2:
create file logger.sh

#file: logger.sh
while true
do
ps -ef | grep xterm >> /tmp/dump
done

chmod 700 logger.sh
export DISPLAY=a.b.c.d:0.0
./logger.sh &
xterm
(wait until it errors out)
kill %1 (assuming this is the first job running in the background)

at this point examine the /tmp/dump file to see if the command is running with a -d directive, i.e, instead of accessing the xterm binary, you may be running a script called xterm which may in turn be running the actual xterm binary with a -d option.


also, you can try to invoke xterm using its full path name.

if all of these did not give you anything different, assuming OS versions of sys1 and sys2 are equal, I would suggest copying the xterm binary from sys1 to sys2:/tmp/xterm

then try to run xterm by invoking command /tmp/xterm. if this runs okay, you may probably rule that you had a corrupt binary.

good luck.




________________________________
UNIX because I majored in cryptology...
Matti_Kurkela
Honored Contributor
Solution

Re: Problem with ssh

Set "X11UseLocalhost" to "no" in sshd_config file and restart sshd.

For some reason, HP ships both "older" and "newer" style X applications in HP-UX. The newer ones can handle "localhost" in $DISPLAY variable, but the older ones can't.

MK
marc seguin
Regular Advisor

Re: Problem with ssh

Yes Matti you got it. I found by myself before reading your post.
I noticed that xterm is linked to X11R5 libs. And my other applications are linked to X11R6 libs.
It seems that X11R5 cannot deal with the DISPLAY var set to localhost:x.x, but it needs to be like :x.x
When changing the settings for ssh, it works, but it is a bit less secure.

(Perhaps you explain that in the file attached, but I can't read it.)

Now the question is :
Is there a xterm using X11R6 libs ?

Marc.
marc seguin
Regular Advisor

Re: Problem with ssh

I found it in /usr/contrib/bin/X11 !!