Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #844

  • Loading branch information...
commit e0249899f0909abb06f173bed211b7d06d543eef 1 parent 6d2f65d
@bitprophet bitprophet authored
View
4 docs/changelog.rst
@@ -25,6 +25,10 @@ would have also been included in the 1.2 line.
Changelog
=========
+* :bug:`844` Account for SSH config overhaul in Paramiko 1.10 by e.g. updating
+ treatment of ``IdentityFile`` to handle multiple values. **This and related
+ SSH config parsing changes are backwards incompatible**; we are including
+ them in this release because they do fix incorrect, off-spec behavior.
* :bug:`843` Ensure string ``pool_size`` values get run through ``int()``
before deriving final result (stdlib ``min()`` has odd behavior here...).
Thanks to Chris Kastorff for the catch.
View
2  docs/usage/execution.rst
@@ -785,7 +785,7 @@ If enabled, the following SSH config directives will be loaded and honored by Fa
regular ``ssh``. So a ``Host foo`` entry specifying ``HostName example.com``
will allow you to give Fabric the hostname ``'foo'`` and have that expanded
into ``'example.com'`` at connection time.
-* ``IdentityFile`` will append to (not replace) :ref:`env.key_filename
+* ``IdentityFile`` will extend (not replace) :ref:`env.key_filename
<key-filename>`.
* ``ForwardAgent`` will augment :ref:`env.forward_agent <forward-agent>` in an
"OR" manner: if either is set to a positive value, agent forwarding will be
View
3  fabric/network.py
@@ -169,10 +169,9 @@ def key_filenames():
# Strip out any empty strings (such as the default value...meh)
keys = filter(bool, keys)
# Honor SSH config
- # TODO: fix ssh so it correctly treats IdentityFile as a list
conf = ssh_config()
if 'identityfile' in conf:
- keys.append(conf['identityfile'])
+ keys.extend(conf['identityfile'])
return map(os.path.expanduser, keys)
View
10 tests/support/ssh_config
@@ -1,8 +1,3 @@
-Host *
- User satan
- Port 666
- IdentityFile foobar.pub
-
Host myhost
User neighbor
Port 664
@@ -10,3 +5,8 @@ Host myhost
Host myalias
HostName otherhost
+
+Host *
+ User satan
+ Port 666
+ IdentityFile foobar.pub
View
11 tests/test_network.py
@@ -675,14 +675,3 @@ def test_both(self):
with settings(key_filename=["bizbaz.pub", "whatever.pub"]):
expected = ["bizbaz.pub", "whatever.pub", "foobar.pub"]
eq_(key_filenames(), expected)
-
- def test_specific_host(self):
- """
- SSH lookup aspect should correctly select per-host value
- """
- with settings(
- use_ssh_config=True,
- ssh_config_path=support("ssh_config"),
- host_string="myhost"
- ):
- eq_(key_filenames(), ["neighbor.pub"])
Please sign in to comment.
Something went wrong with that request. Please try again.