E
E
EA-EKB2019-10-15 12:00:33
SSH
EA-EKB, 2019-10-15 12:00:33

How to add multiple ssh keys for one host?

Hello. Can you please tell me how to correctly write ssh_config to use multiple keys for one host and then how to properly configure gulp-rsync?
This config doesn't work:

Host host
    HostName host
    User user1
    IdentityFile /Users/User/.ssh/key1

Host host2
    HostName host
    User user2
    IdentityFile /Users/User/.ssh/key2

I'm trying to set up synchronization via gulp-rsync for several projects under win10 (I know it's a perversion, but I can't digest Linux no matter how hard I try). As I understand it, "Too many authentication failures for" means that ssh-agent slips all the keys at once. Addendum
Host *
IdentitiesOnly=yes
to the config causes the pass to be requested.
In addition to the test site (host), keys for bitbucket will also be needed, but it seems to be easier here, one single key is needed for accounting. Although how will it work with the rest of the keys in ~/.ssh ...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question