Skip to content

Conversation

@JoeZiminski
Copy link
Member

@JoeZiminski JoeZiminski commented Sep 12, 2025

Previously, an SSH private key was written to disk on a file (the public key is added to ~/.ssh/authorized_keys on the central server). We want to give the option to encrypt the rclone config file, for AWS and Google Drive. We could similarly add a password to the SSH key on disk, and then add it to RClone, which holds it in the config and obfuscates it. However, as the approach for AWS and GDrive will be to place a password on the rclone config file, the approach taken here is to store the private key inside the config file, and then add a password to the config file if the user desires. Therefore, there is no longer a private key stored in a separate file.

This PR also performs some general refactoring of the SSH module as it was a bit messy.

This PR also removes the public function write_public_key (which would write the public version of the private key to disk). I'm pretty sure no one would ever use this, I'm not even sure why it would even be necessary unless you wanted to reuse the SSH key that datashuttle is using. But, we can keep it juts for internal use.

Tests are adjusted for the refactoring, its a backend change so no other tests or documentation is needed.

@JoeZiminski JoeZiminski requested a review from cs7-shrey October 24, 2025 13:04
@JoeZiminski
Copy link
Member Author

Thanks @cs7-shrey! Cheers for checking the docstrings I forgot to update these

@JoeZiminski JoeZiminski requested a review from cs7-shrey October 30, 2025 15:32
@JoeZiminski JoeZiminski merged commit c2f4643 into main Nov 3, 2025
18 checks passed
@JoeZiminski JoeZiminski deleted the refactor_ssh_connection branch November 3, 2025 15:30
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.

3 participants