Skip to content

Conversation

JoeZiminski
Copy link
Member

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.

TODO:

  • Add a note in the code that RClone cannot set up SSH keys for us. I looked into this (as it would be nice to manage setup entirely with rclone) but as far as I can tell it is not possible.

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.

1 participant