X11 forwarding through SSH: Can't open display



Hello,

I am using FreeBSD 6.2 and I have been trying to get X11 forwarding
through SSH to work. I've gotten to the point where the environment
variable "DISPLAY" is set, but I get a "Can't open display" error when
I attempt to run an X application. The remote server in question does
not have an X server install.

In /etc/ssh/ssh_config, I have the following lines:
X11Forwarding yes
AllowTcpForwarding yes
UseLogin no

When I first tried logging in with `ssh -Xvvv user@host`, I got an
error message stating that "xauth" could not be found. DISPLAY was not
set and X11 was not forwarded. `sockstat -4 | grep sshd` didn't return
any relevant entries. Looking at the strings of sshd, I noticed that
it had a hard-coded path pointing to "/usr/X11/bin/xauth", so I made a
hard link from "/usr/local/bin/xauth" to "/usr/X11/bin/xauth". Now,
sshd can find xauth, and DISPLAY is properly set to "localhost:10.0".

sockstat shows:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
root sshd 62372 7 tcp4 127.0.0.1:6010 *:*"

However, running `xeyes` reports the error "Error: Can't open display:
localhost:10.0".

Right now, `ssh -Xvvv user@host` shows:
debug2: x11_get_proto: /usr/bin/xauth -f /tmp/ssh-dd77LaQ9BG/xauthfile
generate unix:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200
2>/dev/null
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0

On the local end, I have tried connecting with PuTTY, ssh through
Cygwin, and ssh on a Ubuntu system. I have also tried ssh -Y as well.

Regards,
sk89q
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [opensuse] 11.3 and ssh X forwarding not working
    ... but I cannot seem to get X to work over ssh. ... No xauth data; using fake authentication data for X11 forwarding. ... You have to install on openSUSE the package that contains xauth. ...
    (SuSE)
  • Re: Mplayer - How to control remotely
    ... >> be the X session that you want to display mplayer on. ... > A better option would be to enable X11 forwarding for the ssh session, ... > that way the DISPLAY variable will be automagically set and the X11 ...
    (alt.os.linux)
  • X11 Forwarding with OpenSSH
    ... We are able to do the X11 forwarding and it works as the user ... go into the environment as their ssh IDs. ... functional accounts with no direct access into the account). ... another way to set your Display or gettaround this limitation? ...
    (SunManagers)
  • Re: X11 forwarding from third machine
    ... >I telnet to another box and set the same DISPLAY, run an X app, and I get: ... The telnet session doesn't have the correct xauth credentials to connect ... In your ssh session, type "xauth list" to find out the ...
    (comp.security.ssh)
  • Re: X11 forwarding problems
    ... ]>> I can't get X11 forwarding between two SuSE Linux 9.1 systems to work ... Both are running ssh 3.2.9.1 ... ]> DISPLAY should NOT look like that. ... ]The ssh configuration file are the same on all machines. ...
    (comp.security.ssh)