Recovering SSH Key

I stupidly reinstalled Ubuntu on my desktop on which I had Linux Mint just because I wanted to try it but I ended up with going back to Linux Mint again. I’m writing this blog from my Linux Mint. I casually formatted the hard drive and did a little distro hopping. When I tried to SSH into my blog host on OCI, I realized that I lost the SSH key and no other host can access the blog host. Crap!

However, I was able to recover it relatively quickly. Here is the list of what I did.

  1. Cloned the existing boot volume.
  2. Created an instance out of the cloned boot volume. When I created the instance, I had a chance to enter public key.
  3. Since it was a cloned volume, everything was already on it. Since it’s got a different public IP, I just changed the DNS A Record to point to the new instance.

It’s all back up and I am able to SSH into the host again.

Leave a Reply

Your email address will not be published.