regression: ssh bash completion is unable to handle external known_hosts files

Bug #483499 reported by Nick Moffitt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bash-completion (Debian)
Fix Released
Unknown
bash-completion (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

I have a rather complicated .ssh/config and my known_hosts are split across several files. With the most recent karmic-proposed updates, I now see the following when I try to tab-complete a host (in this case, nerzo.local):

  [nick@vezza(~)] ssh ner-bash: /home/nick/.ssh/ldap_known_hosts: Permission denied
  zo.local

I believe that this actually tab completes because I have it in my core .ssh/known_hosts file. Other hosts that exist only in the ldap_known_hosts stop after the permission denied error.

The permissions of that file are suitable for the task:

  -rw-r--r-- 1 nick nick 112970 2009-11-12 14:16 /home/nick/.ssh/ldap_known_hosts

This appears to be related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525293 which suggests that perhaps the bash completion module is trying to *execute* my ldap_known_hosts file (which would explain the message).

ProblemType: Bug
Architecture: amd64
Date: Mon Nov 16 09:27:00 2009
DistroRelease: Ubuntu 9.10
Package: bash-completion 1:1.0-3ubuntu2
PackageArchitecture: all
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: bash-completion
Uname: Linux 2.6.31-15-generic x86_64

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I have confirmed that the patch linked from the debian bug (herein attached) works with my multiple UserKnownHostsFile entries.

Revision history for this message
Chris Jones (cmsj) wrote :

Nick's changes appear to have been incorporated upstream, but not entirely, so they don't actually work. The attached diff makes Lucid's bash-completion work for me.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I can confirm that the patch Chris Jones attached above works to restore this functionality to lucid.

Chris Jones (cmsj)
Changed in bash-completion (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Jones (cmsj) wrote :

I've reworked the patch into a proper debdiff against the current Lucid package. Test built it locally and it works for me.

Revision history for this message
Chris Jones (cmsj) wrote :

I've also linked a branch with the fix, which may be more relevant than a debdiff in these modern times.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash-completion - 1:1.1-3ubuntu2

---------------
bash-completion (1:1.1-3ubuntu2) lucid; urgency=low

  * debian/patches/support_multiple_hosts_files.diff:
    Fix external ssh known_hosts files (LP: #483499)
  * debian/patches/disable-avahi-browse.diff:
    Disable avahi-browse since it scales poorly in the current
    form. (LP: #510591)
 -- Chris Jones <email address hidden> Wed, 14 Apr 2010 10:26:41 +0100

Changed in bash-completion (Ubuntu):
status: Confirmed → Fix Released
Changed in bash-completion (Debian):
status: Unknown → Fix Released
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.