Requirements is OpenSSL and Bash. It generates password for AES encryption, encrypt file and then it encrypt password with your public key. Tested on Ubuntu 16.04...
- generate public key from your private key:
openssl rsa -in certificate.pem -out publickey.pem -outform PEM -pubout
-
transfer publickey.pem, encrypt.sh and decrypt.sh into your server to backup folder
-
create source file like backup.zip and ancrypt it by calling
./encrypt.sh publickey.pem backup.zip
- done!
- call this command and paste content of your private key (private key is never saved to disk!)
decrypt.sh backup.zip.aes
- done!