ssh -X fails without warning when xauth not installed

Bug #51774 reported by Pavel Šimerda
8
Affects Status Importance Assigned to Milestone
portable OpenSSH
Invalid
Unknown
openssh (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: xauth

SSH with X11 Forwarding enabled on both sides fails when xauth is not installed.

This looks reasonable because X Forwarding needs xauth. But the user should be warned that something failed and why. Now he's just wondering what's wrong and why there's no DISPLAY variable.

Revision history for this message
Mark Reitblatt (mark-reitblatt) wrote :

This is really more of a request, and would be most effectively handled by filing upstream. However, it seems to me that perhaps xauth should be in openssh-client's "recommends" or "requires" list, not just "suggests". It should also be noted in the config file since xauth is not installed by default with openssh-client.

Changed in openssh:
status: Unknown → Confirmed
Changed in openssh:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Changed in openssh:
status: Confirmed → Unknown
Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

I see 2 ways of fixing this:
1) Add xauth to the dependencies of openssh-client.
2) Add a warning message if the user uses -X and have no xauth installed.

I also think it's an openssh-client bug, not a xauth problem ("Binary package hint": must be openssh-client)

Changed in openssh:
status: Unknown → Confirmed
Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

Attaching a patch.

Revision history for this message
Colin Watson (cjwatson) wrote :

Nicolas, thanks, but I'm not sure that really addresses the bug. Even after this it will still be the case that ssh -X will fail confusingly if xauth is not installed.

A dependency would definitely not be appropriate - it needs a warning message.

Revision history for this message
Colin Watson (cjwatson) wrote :

I've committed an improved variant of Nicolas' patch to my Debian tree, but have unsubscribed ubuntu-main-sponsors as I still think this needs further work.

Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

Can someone confirm the bug and if it's still valid paste the output here to add a warning saying that this package should be installed.

Changed in openssh:
status: Confirmed → Invalid
Revision history for this message
Victor Engmark (victor-engmark) wrote :

Confirmed on Ubuntu Server 9.10 - Please reset status.

Details:
/etc/ssh/sshd_config contained
X11Forwarding yes
X11DisplayOffset 10

ssh -X and ssh -Y worked fine, but DISPLAY was not set, and the result was the following:
$ meld foo bar
/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/lib/meld/gnomeglade.py:123: GtkWarning: cannot open display:
  self.program = gnome.program_init(name, version)

Installing xauth worked:
$ sudo apt-get install xauth
$ logout
$ ssh -Y hostname
$ meld foo bar &

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.