_____ ______ ______ ______ __ __ __ ______
/\ __-. /\ __ \ /\__ _\ /\ ___\ /\ \_\ \ /\ \ /\ ___\
\ \ \/\ \ \ \ \/\ \ \/_/\ \/ \ \ __\ \ \____ \ \ \ \____ \ \ __\
\ \____- \ \_____\ \ \_\ \ \_\ \/\_____\ \ \_____\ \ \_____\
\/____/ \/_____/ \/_/ \/_/ \/_____/ \/_____/ \/_____/
To use this on a new machine, follow these steps:
-
Clone the Git repository and pull the encrypted backup (ssh_backup.enc).
-
Decrypt the encrypted file back to a .tar.gz archive:
openssl enc -aes-256-cbc -d -in ssh_backup.enc -out ssh_backup.tar.gz
- Extract the decrypted archive back into your .ssh directory:
tar -xzf ssh_backup.tar.gz -C ~/
- Set the correct permissions for the .ssh directory and its contents:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
- Add any required keys to the SSH agent:
ssh-add ~/.ssh/<your-key-file>