Skip to content

Instantly share code, notes, and snippets.

View stefanosandes's full-sized avatar
🏠
Working from home

Stefano Sandes stefanosandes

🏠
Working from home
View GitHub Profile
@stefanosandes
stefanosandes / Backup-and-Restore-GPG-and-SSH-keys.md
Created April 28, 2023 08:58 — forked from colematt/Backup-and-Restore-GPG-and-SSH-keys.md
[Backup and Restore GPG and SSH keys] #git #gpg #ssh

Backup

  1. Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive. Identify the private key by executing the following command.
    gpg --list-secret-keys --keyid-format LONG
    
  2. It will show something similar to this.
    sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]