I currently have this in my .ssh/config file:
Host *
AskPassGUI no
IdentityFile ~/.ssh/%r@%h
IdentityFile ~/.ssh/%h
IdentityFile ~/.ssh/id_dsa
When I ssh into a host that I don't have a key file for, login works, but I also get these errors:
no such identity: /Users/user/.ssh/user@example.com: No such file or directory
no such identity: /Users/user/.ssh/example.com: No such file or directory
Ideally, i'd like ssh to check for the files, but not throw an error if any of them can't be found. The idea is to be able to put private keys named like "user@example.com" or "example.com" into my .ssh directory, and have ssh use those when logging in with that user / host combo, but not complain and then log in normally if the file is missing.
I don't want to use Host
directives as described in this answer, because I have a lot of key files and I'd rather not have to both add them to the folder, then edit the config file and add host directives for each one.
Is such a thing possible?