RSS Feed Subscribe to RSS Feed

 

Copying keys to a new laptop

If you use GPG (which I have written about before) and start using a new laptop, you will need to copy your keys over.

While it is possible to copy just your personal key, I prefer to also copy other people’s (public) keys too, and my entire trust database. To do this is fairly simple…

scp -rp ~/.gnupg user@destinationIP:~

obviously replacing user@destinationIP with your username and the IP of your new laptop.

  • Everything after the : is the destination path, so in this case, “~” for the remote user’s home directory
  • -p      Preserves times from the original file
  • -r       Recursively copies the entire directory

If you now open GPG Keychain, your keys should show up without further action.

References

What is my IP address?

From the command line:

ifconfig | grep ‘inet ‘ | grep -v 127.0.0.1

From the System Preferences:

To find the IP address of your laptop, go to

System Preferences -> Network -> Advanced -> TCP/IP

It will be listed under IPv4 Address.

References:

 

Tags: , , , ,

Leave a Reply