AnswerBun.com

What is the best way to backup an SSH key in case my hard drive fails, etc?

Super User Asked by SidedTech on December 6, 2020

I have disabled root user login for my CentOS server running cPanel. This is frustrating, as I then cannot login via SFTP and get to my root files on my server to check error logs (which I frequently have to do).

So I decided to just re-enable root login and set up SSH as it seems that this is very secure, but it seems this will create a key on my computer that once lost, I will not be able to retrieve, and could possibly lock me out of my own server forever (I may be mistaken on this).

So if that’s the case, I would need a way to back up my keys on a flash drive or a Dropbox or something. This way if I reinstall Windows (which I do all the time because it’s fun) or lose my data somehow, I can just get back to work without a workaround, if there even is one.

🙂

One Answer

What is the format of the key you have?

If it is a using the OpenSSH format (and not putty) then it is probably a plain text file. Just copy the text into a secure note in lastpass or whatever password manager you use. If key key is in some binary format, you could just base64 encode it and store it somewhere.

Heck, you could print it out even, though it would be a pain, if you ever had to manually retype it.

If you do choose to store a copy on the cloud, you should be certain that you have set a strong pass-phrase on the key so that it is encrypted.

Answered by Zoredache on December 6, 2020

Add your own answers!

Related Questions

Solved-How to bulk rename IMG files in Windows

1  Asked on December 5, 2020 by empty_tables

     

Verify which key was used to connect to SSH

1  Asked on December 5, 2020 by ricky

 

Can’t install gcc with cygwin on Windows 10

1  Asked on December 4, 2020 by user69453

     

Potential DNS leak with openVPN on Linux

0  Asked on December 4, 2020 by nox

         

A linux program that uses memory

7  Asked on December 4, 2020 by tony_sid

   

Nested virtualization – VirtualBox on Linux in Hyper-V

0  Asked on December 3, 2020 by jonathan-dahlin

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir