How do you backup your ssh keys?

There are a lot of tutos about backing up ssh keys. But where do you store them? Some just copy them to usb flash (encrypted or not), others compress them to password protected file, there are even who save them to the cloud and some who print them…(the internet is full of fascinating stories :smiley: )

My question is : how do you back them up and where ?

Good question.

I have backed them up in the past in my KDBX (KeePass) password file.

I currently don’t really back them up because have easy access to the physical machines.

I imagine backing up SSH keys is more of a necessity for those that use a VPS.


I use password-store, so gpg protected and synced using nextcloud.

1 Like

I totally agree with @arkadi: this is really (and only?) important when another means to access the server is hard to set-up or even impossible — in that case, I encourage you to find and create something! :wink:

Recently, I switched to store my keys directly into KeePassXC. Now, when I unlock the database, the SSH agent is automatically populated with the keys (you have options to choose when the key is made available and when it is removed).

Note that if you connect from several computers to the server, the odds of losing all means to connect to the server are very low. And thus the backup is less important/urgent…