Answer the question
In order to leave comments, you need to log in
How to choose an ssh key?
Please tell me, I have an ssh key on one project, it is called id_rsa.pub , another project has appeared and there is also a key with the same name, so that the files do not conflict, I put the second key in another folder.
that is:
1) id_rsa.pub
2) testFolder/id_rsa.pub
And when I try to enter via cmd to the server 2 of the project, it immediately asks for a password and it feels like by default it sees id_rsa.pub in the ssh folder and uses it.
Please tell me if I'm thinking correctly and if so, how to specify the path to ssh for a specific session
. That is, conditionally, I opened cmd -> ssh [email protected] and entered the path to the desired ssh
. I work under windows 10
Answer the question
In order to leave comments, you need to log in
There are three options:
1. Use one key, the second is not needed. Keys are personal data, everyone has their own private key, and where necessary, the public part is written.
2. Register the key in the SSH Agent `ssh-add ~/.ssh/testFolder/id_rsa` (it can be difficult on Windows)
3. Specify the key when connecting: `ssh -i ~/.ssh/testFolder/id_rsa [email protected]`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question