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

Added rsa-sha-xxx key sig support #1200

Closed
wants to merge 2 commits into from
Closed

Conversation

Eugeny
Copy link

@Eugeny Eugeny commented Jul 29, 2022

Sign SSH_MSG_USERAUTH_REQUEST with rsa-sha256 / rsa-sha512 if the server advertises support for either in serverHostKey

Fixes #989

zxdong262 added a commit to electerm/ssh2 that referenced this pull request Aug 3, 2022
zxdong262 added a commit to electerm/electerm that referenced this pull request Aug 3, 2022
@alanhg
Copy link

alanhg commented Aug 27, 2022

Hope to be merged soon

@Badestrand
Copy link

Any progress here? Sorry, I don't want to sound rude, I am just in need of this fix 😃

@mscdex
Copy link
Owner

mscdex commented Sep 10, 2022

No, I haven't had time to re-review the whole situation in light of this as far as finding the best solution going forward.

@Badestrand
Copy link

Hmm I understand. Especially if you are looking to find a generalized solution that covers all cases, especially The RFCs mention that if the server doesn't send a signature algorithm list or doesn't support the extension negotiation mechanism at all.

However in this pull request I think only the very specific case is covered where the user gave a ssh-rsa and the server asks for a rsa-sha2-256/512 key.

So this pull request doesn't cover the entire problem BUT it might cover 80% of all problematic use cases that we have today. I mean, right now one can not even connect to a standard Ubuntu 22.04 box, and that would be solved by the PR. We could merge the pull request and leave the rest of the problem, like an empty or omitted algo list, for later.

@gpetrov
Copy link

gpetrov commented Sep 11, 2022

Yes @mscdex please consider merging this pr asap as ssh2 can't currently connect to all new Ubuntu 22 installs while regular ssh have no problems at all. So it is a big issue for us.

@kirill-ivlev
Copy link

@mscdex any updates or plans on this PR?

@mscdex
Copy link
Owner

mscdex commented Oct 11, 2022

@kirill-ivlev No, nothing has changed since my previous comment.

@Badestrand
Copy link

For everyone looking for a solution in the meantime, I forked this repo, applied this pull request and published it on npm as ssh2-fix-1200.

So you can do

npm uninstall --save ssh2
npm install --save ssh2-1200-fix

and in your code change import SSH2 from 'ssh2' to import SSH2 from 'ssh2-1200-fix'.

You can easily change it back later when the main repository here is updated.

@thimpat
Copy link

thimpat commented Jan 7, 2023

Hi @Badestrand,

The module ssh2-1200-fix seems to work with the latest Ubuntu versions (The original module fails).
However, no license file prevents binding the module to other projects. Will you update the module with a license file? It would be great if that was possible. Thank you.

@dalisoft
Copy link

dalisoft commented Jan 26, 2023

Could be nice to this module/PR merged

@zWingz
Copy link

zWingz commented Feb 9, 2023

image

I have the same problem. Hope to be merged soon

@addaleax
Copy link

addaleax commented Apr 5, 2023

@mscdex Would it be acceptable to merge this if it was behind an opt-in flag? It would be very nice to see something along these lines happen as newer OpenSSH server versions see broader adoption.

@mscdex
Copy link
Owner

mscdex commented Apr 12, 2023

Please see my comment here.

@mscdex mscdex closed this Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

publickey auth fails in ssh2, but works from command line