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

Fix: Unable to launch WinSCP for SSH sessions using private key #10308

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

OpaqueGlass
Copy link
Contributor

This PR attempts to fix #10113.

Read the location of the privateKey from SSHSession.option.privateKeys and pass the passphrase to winscp.com /keygen.

Tested scenarios:

  • the privateKey from the file system or the vault.
  • Read the saved password from passwordStorage.

Unsupported scenario:

  • If the privateKey is set with a passphrase and the passphrase is not remembered, it will not prompt the user for the password and will throw an error at the /keygen step.

    To accomplish this, it may be necessary to modify or duplicate some code in session/ssh.ts SSHSession.loadPrivateKeyWithPassphraseMaybe(). Considering my implementation is a bit repetitive with some logic in ssh.ts , I haven't made modifications about this scenario.

@Eugeny Eugeny merged commit 15f4182 into Eugeny:master Feb 19, 2025
10 checks passed
@Eugeny
Copy link
Owner

Eugeny commented Feb 19, 2025

Thank you!

@Eugeny
Copy link
Owner

Eugeny commented Feb 19, 2025

@all-contributors add @OpaqueGlass for code

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.

[v1.0.216] Cannot launch WinSCP
2 participants