-
-
Notifications
You must be signed in to change notification settings - Fork 890
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
Cannot connect to server with private key #1960
Comments
I think 356ab5f (implementation of RFC8308) should fix the issue for you if you want to pull the latest 3.0 version from git (or just copy / paste phpseclib/Net/SSH2.php). More specifically, I think this issue would be a non-issue if phpseclib tried rsa-sha2-256 or rsa-sha2-512 auth vs just ssh-rsa auth but phpseclib isn't trying rsa-sha2-256 / rsa-sha2-512, which I believe the commit I just made should fix. It is a little strange, tho - according to your SSH debug info the SSH server should support ssh-rsa auth. It mentions it as a supported signing algorithm on this line:
Regardless, I still think this code change should fix the issue for you! |
I just tried the current state of
Therefore I just copied the contents of that file as you described over the current state of 3.0.33 With that new file its still not working. |
Sorry, I had to use the |
Try it again. Relevant commit: |
Still not working. If it helps, the state of
is
and
therefore it defaults to
later in the switch-case |
Try it again! Also, I apologize for the trial and error - I don't have a server that reproduces the issue (well that claims to support ssh-rsa but then doesn't, among other things), which complicates things. I could put more effort into trying to create a server that reproduces the issue but I'm also trying to get some stuff taken care of before Thanksgiving Day in the United States tomorrow so I'm trying to multi task and meh. |
Oh no worries, I am very grateful for your quick and very supportive attitude because.... it now works 🥳 Many thanks for getting this resolved 🙇🏻 |
Glad to hear it! And thank you for the donation! 😀 |
We can successfully connect to the given server via "normal" SSH but for some reason it doesn't work with phpseclib.
Here is the
NET_SSH2_LOGGING
output after doingHere is the output of
ssh -v
The text was updated successfully, but these errors were encountered: