Bug 927363
| Summary: | bash-completion does not complete hostnames from /etc/ssh/ssh_known_hosts | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ralf Oltmanns <ros> | ||||
| Component: | bash-completion | Assignee: | Ville Skyttä <ville.skytta> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 18 | CC: | sheltren, ville.skytta | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-03-31 12:52:01 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Ralf Oltmanns
2013-03-25 18:37:59 UTC
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. |