S
S
Sergey Pugovkin2018-10-05 16:26:01
SSH
Sergey Pugovkin, 2018-10-05 16:26:01

SSH on Windows 10: how to set up multiple keys?

Something I do not quite understand how the ssh client works in windows 10
https://docs.microsoft.com/ru-ru/azure/virtual-mac... Is
the key automatically picked up when connecting to the server? And if there are several keys for different servers? (this is not about azure servers, but in general).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2018-10-05
@Driver86

When connecting to the server, the key is automatically picked up either by the standard one:
c:/Users/YourUserName/.ssh/id_rsa
Most often, 1 key is used for all administered servers. Otherwise, you must specify a key for each server in the c:/Users/YourUserName/.ssh/config file, for example

Host myserver1
HostName server1.example.com
User username1
IdentityFile c:/Users/YourUserName/.ssh/id_rsa-1

Host myserver2
HostName server2.example.com
User username2
IdentityFile c:/Users/YourUserName/.ssh/id_rsa-2

In addition, it will be possible to connect to these servers using an alias from the config:
ssh myserver2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question