Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
46
rated 0 times [  46] [ 0]  / answers: 1 / hits: 49685  / 2 Years ago, thu, april 28, 2022, 11:12:39

I am planning to do a fresh install of ubuntu 11.10 in my system. Before that i have setuped key based ssh authentication in this machine. Is it possible to take backup of those ssh keys, so that i can use that in my new installation. Or else i must setup keybased ssh authentication again? If i can take backup, what are the files i need to copy? Can someone explain it in detail pls. Thanks in advance.


More From » ssh

 Answers
1

Responding to SSH only... yes, you can keep your keys.



I can't think of any topic on which to expound about that, though. It is straight forward: if your username is karthick, then the keys are located in a hidden directory here:



/home/karthick/.ssh


or



~/.ssh


The id_rsa.pub file contains the public key used to authenticate. But there are other files to keep - all of them, really, such as known_hosts for example. The MOST IMPORTANT is id_rsa (note the lack of .pub) as this is your private key. Back up each user. For example, if you set up SSH for root, get /root/.ssh as well. And so on for as many accounts as you have for this reason.


[#41398] Friday, April 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
scusaper

Total Points: 335
Total Questions: 111
Total Answers: 119

Location: Belize
Member since Mon, Jun 20, 2022
2 Years ago
;