fix paramiko loading of private keys

load_system_host_keys() does more than it implies, it also sets
up the connections to ssh-agent which lets you use password
protected private keys. By changing the order of these paramiko
calls people can use password protected keys.

Figured this out when looking at gerritlib code which worked with
my default keys.
This commit is contained in:
Sean Dague 2013-06-08 07:28:16 -04:00
parent 24ce9d73ef
commit 16fb3b7929

View File

@ -53,8 +53,8 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False):
all_changes = []
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
for project in projects:
changes = []