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 Tunnel Identity File Problems #1882

Closed
JeffreyAngell opened this issue Jan 9, 2020 · 4 comments
Closed

SSH Tunnel Identity File Problems #1882

JeffreyAngell opened this issue Jan 9, 2020 · 4 comments
Assignees

Comments

@JeffreyAngell
Copy link

While attempting to connect via SSH tunnel using an identity file and passphrase on the latest stable community version, I was only able to get it to work with an RSA key encrypted with AES-128-CBC or DES-EDE3-CBC. It failed to work with AES-192-CBC, AES-256-CBC, or with an openssh private key.

I got a variety of errors when using these other ciphers, including Uncaught Error: Expected 0x2: got 0x18, Uncaught Error: encoding too long, and Uncaught Error: Cannot parse privateKey: Unsupported key format.

Please add support at least for at least longer key lengths of AES, and potentially for other ciphers and key formats.

@JeffreyAngell
Copy link
Author

Confirmed that I get this same issue on current tip of master for at least AES-256-CBC

@imlucas
Copy link
Contributor

imlucas commented Jan 9, 2020

These algorithms are supported but not enabled by default. COMPASS-4069 will update ssh2 and when combined with #1873 adding the below to client/server construction in ssh-tunnel.js will resolve this problem.

{ algorithms: { cipher: require('ssh2-streams').constants.ALGORITHMS.SUPPORTED_CIPHER } }

@imlucas imlucas self-assigned this Jan 9, 2020
@Anemy
Copy link
Member

Anemy commented Sep 1, 2020

Looks like we've updated ssh2 which should pull in support for these algorithms. Thanks for bringing this up!

Commit: mongodb-js/connection-model@32ee5b3

@Anemy Anemy closed this as completed Sep 1, 2020
@imlucas
Copy link
Contributor

imlucas commented Sep 4, 2020

Thanks, @Anemy!

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

No branches or pull requests

3 participants