Package: zsh Version: 4.3.10-11 Severity: normal When I do "ssh pru[TAB]", ssh completes to a non-resolvable hostname from the .ssh/known_hosts file: prunille.vinc17.org
In fact this machine is resolvable only from my local network, and it is an error to assume that a host key in .ssh/known_hosts is necessarily resolvable (it may be there just to check the key thanks to a HostKeyAlias declaration). IMHO, if the key is listed as an alias from .ssh/config but not as a Host identifier, it should be discarded. Hosts from .ssh/config should be used instead. The algorithm would be: 1. Take all host identifiers after Host declarations from .ssh/config (strings with '?' and/or '*' should not be taken into account). 2. Add all hosts from .ssh/known_hosts that are not an argument of a HostKeyAlias declaration (if hosts are in fact hashes, due to HashKnownHosts, they should not be taken into account). For instance, if .ssh/config has: Host myhost HostKeyAlias my-real-host-name.mydomain Hostname gateway.mydomain Port 12345 then "ssh my[TAB]" should complete to myhost only. Of course, as a workaround to the current behavior, the user could write: Host myhost my-real-host-name.mydomain HostKeyAlias my-real-host-name.mydomain Hostname gateway.mydomain Port 12345 but this can make maintenance of the config file less easy. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-2-amd64 (SMP w/8 CPU cores) Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages zsh depends on: ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii libcap2 1:2.17-2 support for getting/setting POSIX. ii libncursesw5 5.7+20090803-2 shared libraries for terminal hand Versions of packages zsh recommends: ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii libpcre3 7.8-3 Perl 5 Compatible Regular Expressi Versions of packages zsh suggests: ii zsh-doc 4.3.10-11 zsh documentation - info/HTML form -- no debconf information -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

