Changing the order of private keys passed via ssh login

See if the identity file is listed

ssh-add -l

If not, add it

ssh-add ~/.ssh/username  

Was then able to select the proper identity file


It looks like ssh is trying all the identities it knows about. If you want to only try the identity specified in the config file, add the line

IdentitiesOnly = yes

to that Host section of your .ssh/config file.

Here's the relevant section of the ssh_config man page:

IdentitiesOnly Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) offers more identities. The argument to this keyword must be ''yes'' or ''no''. This option is intended for situations where ssh-agent offers many different identities. The default is ''no''.