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:
parent
24ce9d73ef
commit
16fb3b7929
2
utils.py
2
utils.py
@ -53,8 +53,8 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False):
|
|||||||
all_changes = []
|
all_changes = []
|
||||||
|
|
||||||
client = paramiko.SSHClient()
|
client = paramiko.SSHClient()
|
||||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
||||||
client.load_system_host_keys()
|
client.load_system_host_keys()
|
||||||
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
|
||||||
for project in projects:
|
for project in projects:
|
||||||
changes = []
|
changes = []
|
||||||
|
Loading…
Reference in New Issue
Block a user