Managed File Transfer provides a more secure file transfer options. Implementing this requires the use of secured key pairs.
The following is a summary of steps and references.
Full credit to Mr. Martin Ng.
Platform: AWS EC2 running on Ubuntu AMI. References to path may be different, with ISPConfig installed for virtual hosting management.
For key generation:
https://www.thesecuritybuddy.com/pgp-and-gpg/how-to-generate-gpg-key/
For generating enough entropy at the last step of key generation (need to open another SSH):
https://serverfault.com/a/950103 (essentially run ls on root path so that it generates disk operations / entropy)
Encrypting and decrypting:
https://www.gnupg.org/gph/en/manual/x110.html
Passing passphrase in decrypting (simplified as using this --batch --passphrase 'thepassphrase'):
https://superuser.com/a/1358025
Note:
The ".gnupg" directory should be in the same directory of the PHP files
".gnupg" was prepared using "ubuntu" user under its own home directory (/home/ubuntu/).
Then it was copied to /var/www/domain.com/web/ and chowned to the web*:client"x" user.
(This is ISPConfig specific)
The following is a summary of steps and references.
Full credit to Mr. Martin Ng.
Platform: AWS EC2 running on Ubuntu AMI. References to path may be different, with ISPConfig installed for virtual hosting management.
For key generation:
https://www.thesecuritybuddy.com/pgp-and-gpg/how-to-generate-gpg-key/
For generating enough entropy at the last step of key generation (need to open another SSH):
https://serverfault.com/a/950103 (essentially run ls on root path so that it generates disk operations / entropy)
Encrypting and decrypting:
https://www.gnupg.org/gph/en/manual/x110.html
Passing passphrase in decrypting (simplified as using this --batch --passphrase 'thepassphrase'):
https://superuser.com/a/1358025
Note:
The ".gnupg" directory should be in the same directory of the PHP files
".gnupg" was prepared using "ubuntu" user under its own home directory (/home/ubuntu/).
Then it was copied to /var/www/domain.com/web/ and chowned to the web*:client"x" user.
(This is ISPConfig specific)
Comments
Post a Comment