-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 private key forwarding to winscp #7143
Conversation
Thanks! I'm on vacation until net week and will check it out then. |
Sure, no rush, In the end this might be more of a proof of concept rather than final implementation due to aforementioned shortcomings. await this.platform.exec(path, args)
tmpFile?.cleanup() Though that would make tabby wait to remove the file until winSCP is closed(or tabby itself is closed as tmp-promise library states that it will clean files on process exit by itself) There might be a deeper issue lurking. It does not feel entirely safe saving user's private key into a temporary directory rather than some secure application storage. Though I'm not too well versed with electron to suggest a better solution right away. |
This sets the indentation size of various filetypes common in this project. The preferred tab width for tab-indented files is unknown, so TODO comments have been left there. This helps keep uniform behavior in any text editor that has EditorConfig enabled. Additionally, the tab width provided for color scheme files makes it easier to align hex values when editing a file manually.
Theme source: https://github.com/savq/melange Theme author: @savq
Made |
Tested and it LGTM - let me know if the changes look ok to you and I'll merge ✌️ |
Yep, LGTM, works like a charm |
Fixes #5106
Fixes #3480
Fixes #6126
Naive ssh key transfer via temporary file converting it to ppk format that is the only one supported in cli arguments in winscp. https://winscp.net/eng/docs/public_key#private
There are couple of additional dependancies in the code.
First one, tmp-promise, already used in some other modules, like tabby-electron. Used for the temporary file creation as winscp does not accept private key directly from stdin
Second one, node-forge, merely used to convert the private key into putty format and is something that would not be needed in an ideal world. Unfortunatelly, sshpk putty private keys support(TritonDataCenter/node-sshpk#76) did not come with proper putty files writer. We'd need to either make a pull request to that upstream project or to Eugene's fork of it.
And finally, even though current sftp functionality is sufficient for 95% of work, making a more sophisticated sftp client(#6319) would be the way to go in the future for a one stop shop experience.
P.S. also, ugly timeout is there not to dispose of a temporary file beforehand and because we don't get a child process reference to hook into.