-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Private key forwarding to winscp isn't working #7204
Comments
No I have it on auto-detect I'll try it with the explicit winscp path later |
Auto-detect didn't function for me either back in the day :( |
I have set the path now and it still doesn't work |
I checked the |
Have you tested it with both the private key and the corresponding passphrase in the vault? |
Hm, yes, tested with the ssh-keygen generated keypair: Key
The comments are required as it seems the parsing library relies on them(that is the function that throws the error for you):
|
My private key looks different for sure I also generated one with ssh-keygen but I used EdDSA |
Okay, that might explain it, even though the forge claims to support it (ED25519) something must be failing. I will dig deeper in the evening! |
It works well if set profile as agent and use pageant as agent, but fails if set profile as auto. |
In that case winscp is just going to use the ssh agent as well so no key forwarding is required |
That's gotta be the issue I'm using a regular openssh private key but with ed25519 instead of rsa |
Actually, there are more bugs on key forwarding. If you log in a remote server with pageant agent and then try to ssh to another one on 1st server , it's ok. But if you do same thing with windows 11 openssh agent , the forwarding does not work. |
I'm able to reproduce the issue with the ed25519, the source issue is in a node-sshpk library which is used internally by Tabby to handle private keys and at that point when winSCP is being launched the key is only available from that object. It fails to properly serialize the key back from the parsed state. Though parsing goes correctly since Tabby is able to open the connection. |
Actually, a correction. The key is available as string at that point as well, but node-sshpk is used for its auto parsing mode: https://github.com/TritonDataCenter/node-sshpk#parsekeydata-format--auto-options
|
I've merged that PR into my node-sshpk and bumped it in Tabby - let me know if it helps! |
Alright, played around with it and indeed now node-sshpk serializes a valid pkcs8 formatted key. But encountered a problem on the other side, the node-forge library is not able to read it anyhow(I gave it too much credit and didn't check yesterday): digitalbazaar/forge#667 There is another way, to rely on winscp.com(cli utility tools that come with winscp) and that works, but might be too clumsy, there would need to be another prompt for passphrase if it is not saved. But that would remove node-forge dependency and might be a reliable way to go.
|
happy to use winscp's own converter if it works reliably 👍 |
@artu-ole how are things going? |
@kyuuaria Hey, sorry mate, didn't have time to get into it yet between work and personal life. Since that's still a pressing issue for you and the path forward seems clear I'll give a try next week and hopefully will have something to share then! |
Describe the problem:
The private key forwarding to winscp added in #7143 doesn't work for me. Clicking
Launch WinSCP
simply doesn't do anything. There is also nothing in the logs. It should be noted that I got both my private key and the corresponding passphrase in the vault. I also made sure to add winscp to path because I thought it might not be able to execute the command.The text was updated successfully, but these errors were encountered: