Skip to content

Commit

Permalink
Merge branch '1.14' into 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Oct 2, 2014
2 parents cdd023f + 5f28b9c commit 7ebbabe
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ def lookup(self, hostname):
"""
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
Expand Down

0 comments on commit 7ebbabe

Please sign in to comment.