mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
Mostly just because it's nice. But now we can avoid having the same `options` files for the tests.
14 lines
469 B
Python
14 lines
469 B
Python
from paramiko.client import AutoAddPolicy, WarningPolicy, RejectPolicy, SSHClient
|
|
|
|
client = SSHClient()
|
|
|
|
client.set_missing_host_key_policy(AutoAddPolicy) # bad
|
|
client.set_missing_host_key_policy(RejectPolicy) # good
|
|
client.set_missing_host_key_policy(WarningPolicy) # bad
|
|
|
|
# Using instances
|
|
|
|
client.set_missing_host_key_policy(AutoAddPolicy()) # bad
|
|
client.set_missing_host_key_policy(RejectPolicy()) # good
|
|
client.set_missing_host_key_policy(WarningPolicy()) # bad
|