Bug 1015935 - Bash completion handles HostName entries in .ssh/config that have "%h" incorrectly
Summary: Bash completion handles HostName entries in .ssh/config that have "%h" incorr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 19
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 00:47 UTC by Michael
Modified: 2014-11-15 09:09 UTC (History)
4 users (show)

Fixed In Version: bash-completion-2.1-6.20141110git52d8316.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-15 09:09:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Michael 2013-10-07 00:47:14 UTC
Description of problem:

Bash completion handles HostName entries in .ssh/config that have "%h" in them incorrectly. It displays the string containing %h as a list of ssh targets, which is an error because hostnames of the form %h.domain.com never exist.

Version-Release number of selected component (if applicable):

bash-completion-2.1-2.fc19.noarch

How reproducible:

Always

Steps to Reproduce:
1. Add an entry to ~/.ssh/config like the following:

Host red green
    HostName %h.acmepaint.com

2. Type "ssh" and press tab to expand the list of known hosts

Actual results:

The string "%h.acmepaint.com" shows up in the list, ex:

  green %h.acmepaint.com red

Expected results:

It should either expand the %h entry as ssh does, or not show it at all. That is, either display

  green red

or display

  green green.acmepaint.com red red.acmepaint.com

Additional info:

The %h shorthand feature was added in OpenSSH 5.6 to let users create more concise .ssh/config files. The shortcut above replaces these two "spelled out" entries:
Host green
    HostName green.acmepaint.com
Host red
    HostName red.acmepaint.com

Comment 2 Fedora Update System 2014-11-10 21:32:28 UTC
bash-completion-2.1-6.20141110git52d8316.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/bash-completion-2.1-6.20141110git52d8316.fc21

Comment 3 Fedora Update System 2014-11-12 02:36:46 UTC
Package bash-completion-2.1-6.20141110git52d8316.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bash-completion-2.1-6.20141110git52d8316.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14732/bash-completion-2.1-6.20141110git52d8316.fc21
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-11-15 09:09:47 UTC
bash-completion-2.1-6.20141110git52d8316.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.