@@ -574,7 +574,7 @@ class ssh(Timeout, Logger):
574
574
def __init__ (self , user = None , host = None , port = 22 , password = None , key = None ,
575
575
keyfile = None , proxy_command = None , proxy_sock = None , level = None ,
576
576
cache = True , ssh_agent = False , ignore_config = False , raw = False ,
577
- auth_none = False , * a , ** kw ):
577
+ auth_none = False , disabled_algorithms = None , * a , ** kw ):
578
578
"""Creates a new ssh connection.
579
579
580
580
Arguments:
@@ -593,6 +593,7 @@ def __init__(self, user=None, host=None, port=22, password=None, key=None,
593
593
ignore_config(bool): If :const:`True`, disable usage of ~/.ssh/config and ~/.ssh/authorized_keys
594
594
raw(bool): If :const:`True`, assume a non-standard shell and don't probe the environment
595
595
auth_none(bool): If :const:`True`, try to authenticate with no authentication methods
596
+ disabled_algorithms(dict): Mapping of algorithm type and list of algorithms identifier to disable. Passed directly to paramiko.
596
597
597
598
NOTE: The proxy_command and proxy_sock arguments is only available if a
598
599
fairly new version of paramiko is used.
@@ -682,7 +683,7 @@ def __init__(self, user=None, host=None, port=22, password=None, key=None,
682
683
proxy_sock = None
683
684
684
685
try :
685
- self .client .connect (host , port , user , password , key , keyfiles , self .timeout , allow_agent = ssh_agent , compress = True , sock = proxy_sock , look_for_keys = not ignore_config )
686
+ self .client .connect (host , port , user , password , key , keyfiles , self .timeout , allow_agent = ssh_agent , compress = True , sock = proxy_sock , look_for_keys = not ignore_config , disabled_algorithms = disabled_algorithms )
686
687
except paramiko .BadHostKeyException as e :
687
688
self .error ("Remote host %(host)s is using a different key than stated in known_hosts\n "
688
689
" To remove the existing entry from your known_hosts and trust the new key, run the following commands:\n "
0 commit comments