LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   xauth fails for remote client (https://www.linuxquestions.org/questions/linux-networking-3/xauth-fails-for-remote-client-816675/)

MrUmunhum 06-27-2010 04:26 PM

xauth fails for remote client
 
Hi group,

No sure exactly what the problem is here? I am trying to get a X app running from a remote site on my desktop. I am using this proceedure:
  • xhost +remote host
  • xauth on local host the get 'Cookie'.
  • scp Cookie to remote host
  • xauth merge Cookie into .Xauthority
  • ssh to remote.
  • export DISPLAY=local host:0
  • xfig
xfig fails with "Error: Can't open display: local:0"

If I start another X using '-ac' ( not authinaction) and put to local:1 , all is well.

Can anyone see what is wrong???

FYI, remote is running Debian, local running Fedora 12.

Thanks for your time.

zordrak 06-28-2010 09:12 AM

On remote
Edit /etc/sshd/sshd_config
Set "X11Forwarding yes"
Restart sshd.

On local
ssh -Y user@remote
xfig

MrUmunhum 06-29-2010 12:06 PM

Nice try
 
Quote:

Originally Posted by zordrak (Post 4017221)
On remote
Edit /etc/sshd/sshd_config
Set "X11Forwarding yes"
Restart sshd.

On local
ssh -Y user@remote
xfig

Small point, on Debian, it is " ForwardX11 yes"

Second part did not work:
Code:

Server:~# export DISPLAY=xx.xx.xx.xx:0
Server:~# gedit&
Server:~# cannot open display:
Run 'gedit --help' to see a full list of available command line options.
[2]+  Exit 1                  gedit
Server:~# gedit display=xx.xx.xx.xx:0
cannot open display:
Run 'gedit --help' to see a full list of available command line options.

It is a problem with authentication on the X manager. In this case, GDM.
If I use the no authentication option ( "-ac" ) on X, it works. But that is a security hole.

Thanks for the suggestion anyway.

zordrak 06-30-2010 03:39 AM

Quote:

Originally Posted by MrUmunhum (Post 4018415)
Small point, on Debian, it is " ForwardX11 yes"

How is different on Debian to anything else? It's not something that should be Debian specific; it's sshd.

Quote:

Originally Posted by MrUmunhum (Post 4018415)
Second part did not work:

This is what I said:
Code:

# ssh -Y user@remote
# xfig

This is what you say you did:
Code:

# export DISPLAY=xx.xx.xx.xx:0
# gedit&

They are different and so are unlikely to produce the same result. The whole point being that ssh -Y *sets* your display and it sets it to localhost:10.0 which is necessary for X11 forwarding to work. Instead you have overwritten the DISPLAY variable with a direct connection back to the X server which obviously is not going to work.

Quote:

Originally Posted by MrUmunhum (Post 4018415)
It is a problem with authentication on the X manager. In this case, GDM.

I think you may be confused. AFAIK GDM is just starting X with whatever options it has been told to, including for example whether to set -ac, it doesn't handle authentication to X.

Quote:

Originally Posted by MrUmunhum (Post 4018415)
If I use the no authentication option ( "-ac" ) on X, it works. But that is a security hole.

Still, the problem seems that you are not using SSH X Forwarding, you are simply connecting with SSH and trying to connect back to X with a direct connection that has been explicitly disallowed.

MrUmunhum 07-01-2010 03:47 PM

[Solved] xauth fails for remote client
 
Quote:

This is what I said:
Code:

# ssh -Y user@remote
# xfig

This is what you say you did:
Code:

# export DISPLAY=xx.xx.xx.xx:0
# gedit&
Yes, you are right. Sorry.

Code:

ssh -Y root@remote
gedit&

Works correctly.

Thanks


All times are GMT -5. The time now is 10:14 PM.