diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-10-02 07:33:39 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-10-02 07:33:39 -0700 |
commit | 7ebbabef50bd8b75d9865e76a9534fc7e47273d4 (patch) | |
tree | 814e3a80fc26038fe21d6a289c34205893b0a7a2 | |
parent | cdd023ff66591b02982b88b37806cf80457c950c (diff) | |
parent | 5f28b9c5aed90394288fdc7249b5a527dc009f59 (diff) |
Merge branch '1.14' into 1.15
-rw-r--r-- | paramiko/config.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/paramiko/config.py b/paramiko/config.py index 20ca4aa7..10eea0e9 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -93,13 +93,15 @@ class SSHConfig (object): """ Return a dict of config options for a given hostname. - The host-matching rules of OpenSSH's ``ssh_config`` man page are used, - which means that all configuration options from matching host - specifications are merged, with more specific hostmasks taking - precedence. In other words, if ``"Port"`` is set under ``"Host *"`` - and also ``"Host *.example.com"``, and the lookup is for - ``"ssh.example.com"``, then the port entry for ``"Host *.example.com"`` - will win out. + The host-matching rules of OpenSSH's ``ssh_config`` man page are used: + For each parameter, the first obtained value will be used. The + configuration files contain sections separated by ``Host'' + specifications, and that section is only applied for hosts that match + one of the patterns given in the specification. + + Since the first obtained value for each parameter is used, more host- + specific declarations should be given near the beginning of the file, + and general defaults at the end. The keys in the returned dict are all normalized to lowercase (look for ``"port"``, not ``"Port"``. The values are processed according to the |