[Bug 306430] Re: ~/.ssh/config does not handle multiple hosts correctly
malheum
maxheise at yahoo.de
Mon Feb 2 15:54:39 GMT 2009
I can confirm this bug on fresh install of Ubuntu 8.04.2, i386
$ dpkg -l openssh-client\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Beschreibung
+++-======================================-======================================-============================================================================================
ii openssh-client 1:4.7p1-8ubuntu1.2 secure shell client, an rlogin/rsh/rcp replacement
This is a working config, but it does not conform to the man page:
Host 192.168.1.1 rodent
IdentityFile %d/.ssh/rodent_sysadmin_ssh_key/id_rsa
And this is a non-working config, however it conforms to the man page
Host 192.168.1.1,rodent
IdentityFile %d/.ssh/rodent_sysadmin_ssh_key/id_rsa
The man page says on this topic:
Host Restricts the following declarations (up to the next Host keyword) to be only for those hosts that match one of the patterns given after the keyword. A single
‘*’ as a pattern can be used to provide global defaults for all hosts. The host is the hostname argument given on the command line (i.e. the name is not con‐
verted to a canonicalized host name before matching).
See PATTERNS for more information on patterns.
And under PATTERNS:
PATTERNS
A pattern consists of zero or more non-whitespace characters, ‘*’ (a wildcard that matches zero or more characters), or ‘?’ (a wildcard that matches exactly one charac‐
ter). For example, to specify a set of declarations for any host in the “.co.uk” set of domains, the following pattern could be used:
Host *.co.uk
The following pattern would match any host in the 192.168.0.[0-9]
network range:
Host 192.168.0.?
A pattern-list is a comma-separated list of patterns. Patterns within pattern-lists may be negated by preceding them with an exclamation mark (‘!’). For example, to
allow a key to be used from anywhere within an organisation except from the “dialup” pool, the following entry (in authorized_keys) could be used:
from="!*.dialup.example.com,*.example.com"
--
~/.ssh/config does not handle multiple hosts correctly
https://bugs.launchpad.net/bugs/306430
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in ubuntu.
More information about the Ubuntu-server-bugs
mailing list