-
Encrypt file for self
gpg --encrypt ["name" | --recipient <self@mail.com>] <file>
This will create an encryped <file>.gpg file in same directory. Opening it normally will show gibberish.
-
Decrypt a file
gpg --decrypt <file>.gpg
This will ask for your gpg passphrase and output the original <file>.
-
Export public key to server (so can encrypt files there)
gpg --armor --export <self@mail.com> > pub.key
- Copy
pub.key to server (via scp or copy-paste), then
gpg --import pub.key