简体   繁体   中英

Easiest way to copy ssh key (Used for GIT) from one linux machine to another

I have a ssh key in a dev environment for GIT access . Now I am changing my dev environment. So Is it safe to copy the ssh key or I should generate one ?

The usual approach is for ssh private keys to never ever leave the machine on which they are generated. So the usual approach is to generate new one. It's simple and the git gui even has a menu for it.

Obviously you have to upload the public part of the new key to the server as an authorized key. That's usually simple as well.

That said the key is just a file (usually .ssh/id_rsa ; the name depends on selected type) and can be copied.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM