diff options
author | Martin Topholm <mph@one.com> | 2015-03-02 07:17:50 +0100 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2015-09-30 14:16:28 -0700 |
commit | 669ecbd66f1218e5c93f6a53a25ea062c7b0b947 (patch) | |
tree | 13b30c2ba11ebe07a43fb81b47944526c793281a /tests | |
parent | 48dc72b87567152ac8d45b4bad2bdd0d4ad3ac8b (diff) |
Silently ignore invalid keys in HostKeys.load()
When broken entries exists in known_hosts, paramiko raises SSHException
with "Invalid key". This patch catches the exception during
HostKeys.load() and continues to next line.
This should fix #490.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_hostkeys.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_hostkeys.py b/tests/test_hostkeys.py index 0ee1bbf0..2bdcad9c 100644 --- a/tests/test_hostkeys.py +++ b/tests/test_hostkeys.py @@ -31,6 +31,7 @@ test_hosts_file = """\ secure.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA1PD6U2/TVxET6lkpKhOk5r\ 9q/kAYG6sP9f5zuUYP8i7FOFp/6ncCEbbtg/lB+A3iidyxoSWl+9jtoyyDOOVX4UIDV9G11Ml8om3\ D+jrpI9cycZHqilK0HmxDeCuxbwyMuaCygU9gS2qoRvNLWZk70OpIKSSpBo0Wl3/XUmz9uhc= +broken.example.com ssh-rsa AAAA happy.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA8bP1ZA7DCZDB9J0s50l31M\ BGQ3GQ/Fc7SX6gkpXkwcZryoi4kNFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW\ 5ymME3bQ4J/k1IKxCtz/bAlAqFgKoc+EolMziDYqWIATtW0rYTJvzGAzTmMj80/QpsFH+Pc2M= |