X11 Forwarding

Hi,

I want to use ssh -X over two hosts and unable to do so. So here is the problem:

Code:
[user@HostA]ssh -X root@HostB
[root@HostB]ssh -X root@HostC
[root@HostC]xclock &
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:10.0

Running,
Code:
[user@HostA]ssh -X root@HostB
[root@HostB]xclock &

or,
Code:
[user@HostA]ssh -X root@HostC
[root@HostC]xclock &

results no problems at all.

Regards.
 
Do NOT use root to login with SSH directly!

Try the same with a normal user account.
 
I got the same error after I tried with a normal user account. By the way I used public key authentication in all situations. Will that be a problem?
 
Using ssh -Y instead of ssh -X did the trick. It worked even after two hops.

By the way I didn't mean to ask if public key authentication is OK for root logins. I just wanted to ask if the error could be related with that (and as far as I see, it was not). Of course, root logins will be disabled right after I achieve my goal.

Let me do some more experiments with X11 forwarding and see if I can add some more info on the thread.

By the way, thanks for the link. I was searching a solution for this issue for a long time.
 
Ophiuchus said:
By the way I didn't mean to ask if public key authentication is OK for root logins. I just wanted to ask if the error could be related with that (and as far as I see, it was not).
Ah, no, that should not be an issue. It doesn't matter what type of authetication you use.
 
Back
Top