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
Authentication failed with public key #1135
Comments
|
Remark, I can ssh to the host without any problem, without specifying a password |
|
Same issue, same version. I can ssh from the command line, but Paramiko fails using the rsa key. Any word on this? |
|
anyone here for help, I met this issue too |
|
i also met this issue too, i donot know how to solve it |
|
I am seeing the same issue when using the example file rforward.py. rforward.py works when authenticating with a password, and standard SSH works when authenticating with a private key. For reference here is the output in syslog on the SSH server:
|
|
Can y'all try differing Paramiko versions to see if this was introduced at a specific point in time? More details on your exact keys (eg number of bits, how they were generated, etc) might shed a clue as well - RSA in general clearly still works for most users so something more specific must be at work here. |
|
Also ran into this issue and it seems to be related to the key format. From what I can tell, private keys in the I seems on recent versions of MacOS, |
|
Running into the same issue, any update? |
|
I'm also seeing this issue using
I can log to the server passing the private key file using the |
|
@dpbus How can I check if my private key is in |
|
After reading some more, I found that a And a My file is a PEM key file, so it is not the problem @dpbus mentioned. |
|
@ffleandro (or anyone else) any resolution on this? |
|
@eepstein Yes I solved the following way. I don't remember the previous code but I think I was opening the key the wrong way or I was passing the password to the connect instead of passing when opening the key. |
|
This smells like another dupe of the handful of missing-OpenSSH-feature tickets out there (there's at least 3-4). Please keep an eye on the changelog over the next few weeks/months! |
|
@bitprophet I don't think there is an existing ticket for this issue. (after doing some searching) should we re-open this ticket? or create a more formal request for this ticket with a simple use case? It seems like more people are running to this issue as openssh v8 is deployed more widely. Reference information is: https://coolaj86.com/articles/the-openssh-private-key-format/ |
|
for the new openssh private key format see #1343 |
|
I have confirmed with exactly the same code, paramiko Sample code:- Edit: I fixed this as follows:- |
|
I am also getting this error when I connect to one server, but not another. Both servers use the same keys (hobby project). I can ssh into both. Paramiko works on one server but fails on the other, and the error message really makes it look like a local issue. I tried versions 2.4 - 2.11. |
|
@andyhasit If you're seeing this same error, but in a fashion that's different from the manifestation OP was seeing and one that you're having trouble debugging, your best bet is probably to create a new issue and link back to this one. You might also get some help on Stack Overflow, not sure. |
|
@zhenfzha As above, if you're seeing this same error, but in a fashion that's different from what the OP was seeing and one that you're having trouble debugging, your best bet is probably to create a new issue and link back to this one. You might also get some help on Stack Overflow, not sure. |

The remote side accepts the connection using the public key but paramiko still gives an error. Seems to be a bug in paramiko==2.4.0 (ubuntu 16.04, python 3)
Stack trace :
File "/usr/local/lib/python3.5/dist-packages/pysftp/init.py", line 143, in init
self._transport.connect(**self._tconnect)
File "/usr/local/lib/python3.5/dist-packages/paramiko/transport.py", line 1205, in connect
self.auth_publickey(username, pkey)
File "/usr/local/lib/python3.5/dist-packages/paramiko/transport.py", line 1450, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
File "/usr/local/lib/python3.5/dist-packages/paramiko/auth_handler.py", line 226, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
The text was updated successfully, but these errors were encountered: