Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh_exception.AuthenticationException: Authentication failed (AES-128-CBC) #2094

Open
yinyin2568 opened this issue Jul 27, 2022 · 1 comment

Comments

@yinyin2568
Copy link

paramiko.RSAKey.from_private_key_file(file, password='XXXXXXXX') is unable to log my router.

File "C:/Users/15362/Documents/bdd_atx_qy_app/tools/net/base_ssh.py", line 40, in login
self.ssh.connect(timeout=15, hostname=self.host, port=self.port, username=username, pkey=private_key, allow_agent=False, look_for_keys=False)
File "C:\Users\15362\Documents\bdd_atx_qy_app\env_test\lib\site-packages\paramiko\client.py", line 446, in connect
passphrase,
File "C:\Users\15362\Documents\bdd_atx_qy_app\env_test\lib\site-packages\paramiko\client.py", line 766, in _auth
raise saved_exception
File "C:\Users\15362\Documents\bdd_atx_qy_app\env_test\lib\site-packages\paramiko\client.py", line 666, in _auth
self._transport.auth_publickey(username, pkey)
File "C:\Users\15362\Documents\bdd_atx_qy_app\env_test\lib\site-packages\paramiko\transport.py", line 1634, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
File "C:\Users\15362\Documents\bdd_atx_qy_app\env_test\lib\site-packages\paramiko\auth_handler.py", line 258, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.

but the private key can be used in SSH software.This is my private key .
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,481AC46E02AE11033F311344B6AEFA82
XXXXXXXXXXXXXXXX
-----END RSA PRIVATE KEY-----

@chengyechun
Copy link

Is this an encrypted private key? Does paramiko support encrypted private keys?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants