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 Key fails on RHEL/Alma/Rocky Linux 9 #375

Closed
cshabazian opened this issue Mar 29, 2023 · 2 comments
Closed

SSH Key fails on RHEL/Alma/Rocky Linux 9 #375

cshabazian opened this issue Mar 29, 2023 · 2 comments
Labels
bug Something isn't working dependencies Updates/issues due to dependencies duplicate This issue or pull request already exists

Comments

@cshabazian
Copy link

I have setup a number of ssh connections using an SSH Hop proxy connection.

When end point is a R/A/R 8 box, everything works fine using my private key.

When end point is a R/A/R 9 box, the private key fails and I get an error on the server in /var/log/secure saying:
userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
but this exact same key works to connect to the exact same server using MobaXterm, so it's NOT the key.
If I connect using a password, it works just fine, so I know the connection is configured properly, but it's doing something funny with the key ONLY when going to a R/A/R 9 server.

@SchoofsKelvin SchoofsKelvin added bug Something isn't working dependencies Updates/issues due to dependencies labels Mar 30, 2023
@SchoofsKelvin
Copy link
Owner

Which version of OpenSSH does R/A/R 9 use versus 8? In #309 someone had a similar issue due to OpenSSH deprecating ssh-rsa keys. You'd either have to manually allow it again (it's not removed from OpenSSH, just disabled by default) or possibly re-export the existing key as a different type. A quick search gives me this article which explains it well (before going in-depth into a related issue).

I imagine MobaXterm automatically converts ssh-rsa keys to a format the server accepts when necessary, I think I've read that the latest PuTTY versions do something similar. The underlying SSH library the extension uses (ssh2) doesn't support that yet, which is already known (mscdex/ssh2#989) for a long while. I might try to patch it from my side but that might get tricky.

@SchoofsKelvin SchoofsKelvin added the duplicate This issue or pull request already exists label Apr 1, 2023
@SchoofsKelvin
Copy link
Owner

I assume this is indeed caused by upgrading OpenSSH. Since this is then technically a duplicate of #309, I've updated that issue (with a new comment) and I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Updates/issues due to dependencies duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants