110
35
I have been putting my ssh identity files inside my ~/.ssh/
folder. I have probably about 30 files in there.
When I connect to servers, I will specify the identity file to use with something like
ssh -i ~/.ssh/client1-identity client1@10.1.1.10
However, if I do not specify an identity file, and just use something like this:
ssh user123@example.com
I get the error
Too many authentication failures for user123
I understand that is because if no identity file is specified, and ssh can find identity files, then it will try all of them.
I also understand that I can edit the ~/.ssh/config
file and specify something like:
Host example.com PreferredAuthentications keyboard-interactive,password
in order to prevent that connection from trying known identity files.
So, I guess I could move my identity files outside of the ~/.ssh/
directory, or I could specify each host that I want to disable identity-file authentication for in the config file, but is there any way to tell SSH by default not to search for identity files? Or to specify the ones it will search for?
4Re "I understand that is because..." - use
ssh -v
to find out for sure. – user1686 – 2011-04-09T19:19:26.380