Description of problem: As in earlier Fedora releases, I use an unhashed /etc/ssh/ssh_known_hosts file with permissions 644. When typing 'ssh bb1<tab><tab>' I am not offered any hosts starting with the string bb1 although there are 82 host entries starting with bb1 in my ssh_known_hosts file. Version-Release number of selected component (if applicable): $ rpm -q bash-completion bash-completion-2.0-2.fc18.noarch How reproducible: Always. Steps to Reproduce: 1. Type 'ssh some_partial_hostname<tab><tab>' 2. 3. Actual results: No result at all Expected results: List of all hostnames containing the partial hostname string in /etc/ssh/ssh_known_hosts Additional info: Linux iroquois.at.home 3.8.3-203.fc18.x86_64 #1 SMP Mon Mar 18 12:59:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
The code that completes from /etc/ssh/ssh_known_hosts hasn't gone anywhere, and hostnames from that file do get included in completions for me. Do a "set -x" in a shell, then invoke the completion, and attach the output here (edited as appropriate in case it contains something you don't want to post in public). Also, double-check the permissions of the /etc/ssh dir and /etc/ssh/ssh_known_hosts file that they're readable by the user you're completing as.
Permissions are: ls -la /etc drwxr-xr-x. 2 root root 4096 Mar 25 22:03 ssh/ ls -la /etc/ssh/ -rw-r--r-- 1 root root 678127 Mar 25 21:56 ssh_known_hosts My non-privileged user can read the content of /etc/ssh/ssh_known_hosts as permissions suggest. As user, following 'set -x' and trying i. e. 'ssh ad1<tab>' does not return any output at all. As root, completion works for hostnames and following 'set -x' as expected I do get a verbous output (will attach that afterwards). SElinux is disabled.
Created attachment 716220 [details] -x output from completion as root user
(In reply to comment #2) > As user, following 'set -x' and trying i. e. 'ssh ad1<tab>' does not return > any output at all. I suppose this means your user doesn't have any completion whatsoever installed for ssh, and it doesn't load dynamically either, so bash-completion is effectively disabled for it. Why it's so I don't know, but I'd start by looking into the user's ~/.bashrc and ~/.bash_profile to see if they contain anything unexpected, e.g. verifying that the former sources /etc/bashrc and the latter sources ~/.bashrc.
Your hint on .bashrc and .bash_profile was the right clue. I had some misconfiguration in my .bashrc which caused the problem. I fixed that and completion is working like a charm as it used to. Sorry for the inconvenience caused.
NP, glad to hear you got it sorted out.