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

Support new ssh keys formats: rsa, ecdsa, and ed25519 #25

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

maxcnunes
Copy link
Member

@maxcnunes maxcnunes commented Mar 22, 2021

Will fix sqlectron/sqlectron-gui#471

Upgrades to a new ssh2 version which has support for new ssh key formats: rsa, ecdsa, and ed25519 mscdex/ssh2#352 (comment)

@maxcnunes maxcnunes force-pushed the fix-ssh-connection-new-openssh branch from 71e61e4 to 5c6cb9a Compare March 23, 2021 02:54
@maxcnunes maxcnunes changed the title Support new ssh RSA keys Support new ssh keys Mar 23, 2021
@maxcnunes maxcnunes force-pushed the fix-ssh-connection-new-openssh branch 3 times, most recently from 5cbad75 to 62c0581 Compare March 23, 2021 15:02
@maxcnunes maxcnunes changed the title Support new ssh keys Support new ssh keys formats: rsa, ecdsa, and ed25519 Mar 23, 2021
@maxcnunes maxcnunes force-pushed the fix-ssh-connection-new-openssh branch 24 times, most recently from cf55e47 to fafc7b0 Compare March 23, 2021 23:53
@maxcnunes maxcnunes force-pushed the fix-ssh-connection-new-openssh branch 2 times, most recently from 9ae25fc to bad0a2a Compare March 24, 2021 00:10
@maxcnunes maxcnunes force-pushed the fix-ssh-connection-new-openssh branch from bad0a2a to c624a51 Compare March 24, 2021 00:35
@maxcnunes maxcnunes marked this pull request as ready for review March 24, 2021 00:59
@maxcnunes maxcnunes requested a review from MasterOdin March 24, 2021 01:00
@maxcnunes maxcnunes mentioned this pull request Mar 24, 2021
Copy link
Member

@MasterOdin MasterOdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tweaks, otherwise looks good to merge 👍

Comment on lines 51 to +53
- 9042 # native
ports:
- 9042:9042
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 9042 # native
ports:
- 9042:9042
- 9042:9042 # native


test:
image: node:10.15.0
image: node:10.24.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: node:10.24.0
image: node:12

might as well use a version of node that supports the new ssh key formats as well.

const dbConn = serverSession.createConnection(database);

// ed25519 is only supported by node v12+
if (keyType === 'ed25519' && (process.version.startsWith('v10') || process.version.startsWith('v8'))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (keyType === 'ed25519' && (process.version.startsWith('v10') || process.version.startsWith('v8'))) {
if (keyType === 'ed25519' && process.version.startsWith('v10')) {

Minimum supported version for this package is 10.13, so don't need to worry about the test suite running on 8.x:

"engines": {
"node": ">= 10.13"
},

@maxcnunes
Copy link
Member Author

@MasterOdin FYI, I won't apply any of the suggestions you made to this PR because I have already fixed them in the last PR, so I don't need to rebase it all over again

@maxcnunes maxcnunes merged commit 915c649 into main Mar 26, 2021
@maxcnunes maxcnunes deleted the fix-ssh-connection-new-openssh branch March 26, 2021 17:05
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.

Cannot parse privateKey: Unsupported key format
2 participants