To move to a new system
- Install dependencies
sudo apt-get install -y gnupg2 gnupg-agent scdaemon pcscd
or for MacOS
brew install gnupg pinentry-mac
- Import PGP Public Key
curl https://keybase.io/skulumani/pgp_keys.asc?fingerprint=5dc0e5c9ad73dc63d61d744520d0685093466fc7 | gpg --import
export KEYID=0x20D0685093466FC7
- Move public ssh key to store (Git and Bitbucket are setup with this public key)
curl https://gist.github.com/skulumani/9b839df5b3774956dc562a46a666395f/raw/c9324839f6d08c9402e392898ab066deba176a90/id_rsa_yubikey.pub > ~/.ssh/id_rsa_yubikey.pub
*. Insert and get data from yubikey
gpg --card-status
- Encryption
echo "test message string" | gpg --encrypt --armor --recipient $KEYID > /tmp/test.txt
- Decryption
gpg --decrypt --armor /tmp/test.txt
- Signing
echo "test message string" | gpg --armor --clearsign --default-key $KEYID
SSH onto remote server which has public ssh key
ssh -i ~/.ssh/id_rsa_yubikey.pub name@server
https://github.com/drduh/YubiKey-Guide
https://gist.github.com/ageis/14adc308087859e199912b4c79c4aaa4