Backup e restore de chaves SSH
Tags: linux Category: DevOps
Backup
- Copy both
id_rsaandid_rsa.pubfrom~/.ssh/to a USB drive.
Restore
- Copy both
id_rsaandid_rsa.pubto~/.ssh/ - Change file permissions and ownership of both files.
$ chown user:user ~/.ssh/id_rsa*
$ chmod 600 ~/.ssh/id_rsa
$ chmod 644 ~/.ssh/id_rsa.pub- Start the ssh-agent.
$ exec ssh-agent bash- Add your SSH private key to the ssh-agent.
$ ssh-add ~/.ssh/id_rsaNow you’re ready to use Git and update your repositories.