How do I symmetrically encrypt a file using gpg?
The correct command is gpg --symmetric $MYFILE
.
The encrypt
option tells it to use public-key encryption. The "id" it is asking for is the id of the public key, which you must have in your keyring. (Usually you use an email address for this, but there are other ways to specify which public key to use.)
Combining the two options, as you did, encrypts the session key with a public key and a symmetric cypher, so that either the private key or the password you enter can be used to decrypt.