How to backup and restore ssh keys on Linux

· 1 min read

I just reloaded the OS on my little System76 box and I stumbled around a bit when trying to restore my ssh keys. Here is a note for myself but maybe it can help someone else too.

Backup #

I've written about how I backup my computer and I include my ssh keys in this backup.

Restore #

Copy all files from the previous ~/.ssh directory to the new ~/.ssh directory then execute the following commands:

chmod 400 ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_ed25519
ssh-add

You're welcome future self.

filed under: NoteToSelf Linux ssh

Respond

Send me a webmention

Written a response on your own site? Paste the URL and I'll display it alongside the others once webmention.io verifies the link back.