-
Notifications
You must be signed in to change notification settings - Fork 527
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
Key exchange issue on Debian 12 (Bookworm) #1392
Comments
This is doing a bunch of PAM auth which is where it's failing. Looks like a configuration issue. |
Thank you @willco007. I truly appreciate you looking into it. I've been playing with Any idea what logs I can check or what config file I can play with? What I see is that all is going well, then it creates a child process, enters into an interactive session for SSH2 and boom, I get disconnected.
Here's my sshd_config
|
Alright, still scratching my head. I wrote this little program to test libssh2 and hopefully figure out if I could get an error message, somehow.
Except that when I run it, it looks like it does what it's supposed to do. Here's the output:
So, am I missing something or is everything working as expected? That would mean the disconnection previously is normal. Since I'm not sending any command after the connection, it just disconnects. However, that means I have to look somewhere else for my problem in WordPress 😢 |
It was indeed a configuration issue. Since it's really Debian and WP-related, I'll just share the link to the answer in case it can help someone in need :) |
Following up on this issue: php/pecl-networking-ssh2#74
Describe the bug
Libssh2 seems to have issues with handling or exchanging keys. Certain types of keys that should be accepted aren't, while those that are shown as accepted still trigger a disconnection. I'm trying to use SSH2 to install and update WordPress but it keeps saying that there's a problem with the keys.
To Reproduce
Relying on the PECL/SSH2 wrapper, I used this application created by the author of the issue listed above
To generate keys, I use
ssh-keygen -m PEM -t $type
When using type
rsa-sha2-512
rsa-sha2-256
, orrsa-sha
, sshd logs report the erroruserauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
When using type
ecdsa-sha2-nistp256
orssh-ed25519
, the keys seem to be accepted at first, but then something goes wrong, and I get a disconnection.In all cases, WordPress reports
Installation failed: Public and Private keys incorrect for username
when trying to install a plugin and under Site Health I getUnable to connect to the filesystem. Please confirm your credentials.
Expected behavior
A clear and concise description of what you expected to happen.
Version (please complete the following information):
Additional context
Here's sshd's logs when using an accepted key-pair. Notice that despite the keyexchange technically accepted, ssh2 sends a disconnect (
Received disconnect
) and I get an error saying the keys don't work, seemingly indicating an issue with the exchange within libssh2.The text was updated successfully, but these errors were encountered: