For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:
gpg-agent only automatically starts when gpg is used; for ssh, you'll need to ensure it's running.list command inside gpg --edit-card, look for the Key attributes line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:Key attributes ...: rsa2048 rsa2048 rsa2048