A
A
Alexey Tipa2021-03-02 13:19:23
SSH
Alexey Tipa, 2021-03-02 13:19:23

How to organize SSH keys in Windows?

Now I'm like ...
in the user folder there is a .ssh folder
in which the following files are located:
id_rsa is the key file that I use to log into the server via ssh
1 is the key from another account on the server
2 is also the key from a completely different account

To log into a different account, I need to rename the file "1" to "id_rsa" otherwise the command line "will not find" it.

So, every time I change my ssh account, I have to rename the files to "id_rsa"
How can I get around this?
How to let the command line know which key to use...?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lynn "Coffee Man", 2021-03-02
@Lynn

Omg. Have you tried reading the manual?
Option times:

ssh -i .ssh/1 [email protected]
ssh -i .ssh/2 [email protected]

Option two:
Write the above in .ssh/config (read help)
Option three:
Run ssh-agent and add all three keys to it when logging in

A
AUser0, 2021-03-02
@AUser0

ssh has the -i <id_rsa.file> argument described in the documentation

A
Alexey Tipa, 2021-03-03
@KayzerSoze

Thank you.
"OMG. Have you tried reading the certificate?"
Well, of course not. And I'm not proud of it. And ready to accept your indignation. I agree.
However, when I needed to find the answer to this question, I did it in the most comfortable way for myself.
And plus to all this - we have created content on this site.
If you know what I mean. So, I'm not so lost to society.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question