Table of Contents

Backup the SSH Keys

Archive the private keys

tar zcvf private-keys.tgz id_ed25519

Encrypt the private-keys.tgz archive with a 'master' password

openssl aes-256-cbc -salt -pbkdf2 -in private-keys.tgz -out private-keys.tgz.enc

private-keys.tgz.enc can be made publicly available, as it is encrypted with the master supplied password.

Restore the SSH Keys

wget -P ~/.ssh https://github.com/tanducmai/ssh-keys/raw/master/doc/private-keys.tgz.enc && openssl aes-256-cbc -salt -pbkdf2 -in ~/.ssh/private-keys.tgz.enc -out ~/.ssh/private-keys.tgz -d && tar zxvf ~/.ssh/private-keys.tgz -C ~/.ssh && rm ~/.ssh/private-keys.tgz*