How to move your .ssh generated keys to a new laptop.





How to move your .ssh generated keys to a new laptop.

So I recently changed laptops, from being a Linux user for the past 2.5 years. I was running Parrot during that time, great os by the way if you are into cyber security stuff or just another full-stack developer like me.

I switch over to Mac, and all my ssh keys were in my previous laptop, they access all of my servers in Digital Ocean and AWS, to cloning and pushing to Github and so much more. I could not convince myself to update all servers with the new ssh keys and I had some issues with Github SSH cloning. So here are the steps I took, enabling me to move all my keys to my new laptop.

  • Copy over the ssh keys from your old laptop to the new one, they should be located in the ~/.ssh/ folder. You can use a flash drive or a cloud platform, whatever works for you.
  • Paste the files in your new laptop in the same directory.
  • Add the to your keychain
  • The Catch: If you do that you will get an error like this:

To avoid this run this command;

  • Retry adding it to the keychain
  • The output should be: