Open murata100 opened 2 years ago
The following code worked fine. (If disabled_algorithms is not specified, AuthenticationException: Authentication failed.)
import paramiko with paramiko.SSHClient() as ssh: ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) with open(PATH_OF_PKEY) as f: pk = paramiko.RSAKey.from_private_key(f) ssh.connect( HOST, PORT, SSHUSER, pkey=pk, disabled_algorithms=dict(pubkeys=['rsa-sha2-256', 'rsa-sha2-512']))
But the code below didn't work.
import sshtunnel with sshtunnel.SSHTunnelForwarder( (HOST, PORT), ssh_username=SSHUSER, ssh_pkey=PATH_OF_PKEY, remote_bind_address=(MySQLHOST, MySQLPORT), disabled_algorithms=dict(pubkeys=['rsa-sha2-256', 'rsa-sha2-512']) ) as server: server.start()
I got ValueError
ValueError: Unknown arguments: {'disabled_algorithms': {'pubkeys': ['rsa-sha2-256', 'rsa-sha2-512']}}
How can I pass an argument (disabled_algorithms) to the connection function of an instance of SSHClient in paramiko?
Here's why I need disabled_algorithms: RSA key auth failing from paramiko 2.9.x client to dropbear server
The following code worked fine. (If disabled_algorithms is not specified, AuthenticationException: Authentication failed.)
But the code below didn't work.
I got ValueError
How can I pass an argument (disabled_algorithms) to the connection function of an instance of SSHClient in paramiko?