git - After ssh-keygen, the generated passwords are called id_rsa.pub. Can I change the name?
过去多啦不再A梦
过去多啦不再A梦 2017-05-02 09:34:06
0
4
928

After ssh-keygen, the generated passwords are called id_rsa.pub. Can I change the name?

过去多啦不再A梦
过去多啦不再A梦

reply all(4)
大家讲道理

The generated one is the public key id_rsa.pub and the private key id_rsa
You can use ssh-keygen -f othername to generate the specified file name, or you can rename both after generation

But the ssh command will only read the private key id_rsa by default, so if it is another name, you need to add the configuration file ~/.ssh/config
For example, the following is the configuration of the key I generated specifically for github

Host github.com gist.github.com api.github.com
IdentityFile /path/to/othername
为情所困

That’s not a password,,, that’s just the name of a secret key file. You will never look at it again. Why do you care about it?

黄舟

id_rsa is the private key, id_rsa.pub is the public key
The key is to look at the content inside, just make sure you are happy with the name

PHPzhong
ssh-keygen -t rsa -f ~/.ssh/你开心就好

will be in ~/.ssh/目录下生成你开心就好的私钥和你开心就好.pub’s public key.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template