1825950 Members
3274 Online
109690 Solutions
New Discussion

ssh wrong authentication

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

ssh wrong authentication

Hi all:

Working with HPUX 11.11 & 11.23.
ssh versions 4.3p2, A.4.20, A.4.00

I am trying to use the X11 forwarding (-X) when I login to HPUX systems from a Linux workstation.
root login only on console so I login as myself then su -.
I am able to execute xclock while logged in as myself. When I 'su -' I am unable to run any X applications. Get the error "X11 connection rejected because of wrong authentication.
X connection to 1.2.3.4:20.0 broken (explicit kill or server shutdown).

How to run the X apps after I switch user to root acct?

4 REPLIES 4
Heironimus
Honored Contributor
Solution

Re: ssh wrong authentication

"su -" clears most of your environment. After you log in as yourself echo $DISPLAY so you know exactly what your display is. Then su to root and:

DISPLAY=your-display-value ; export DISPLAY
XAUTHORITY=~youruser/.Xauthority ; export XAUTHORITY
Steven E. Protter
Exalted Contributor

Re: ssh wrong authentication

Shalom,

I'm no expert on this by ssh -Y seems to work better when connecting to HP-UX servers.

I think direct root login is necessary to make this work properly or there is an environment problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peter Leddy_1
Esteemed Contributor

Re: ssh wrong authentication

Hi Rick,

Have you seen this thread, the 2nd problem is a similar type issue to yours.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1001072

Regards,

Peter
Rick Garland
Honored Contributor

Re: ssh wrong authentication

export DISPLAY and XAUTHORITY does the trick.

Many thanks!