2

I have a number of entries in ~/.ssh/config:

Host github.com
  Hostname github.com
  User git
  IdentityFile ~/.ssh/github

Host mydomain.com
  User name
  IdentityFile ~/.ssh/id_rsa

Host full.name@work.com
  Hostname work.com
  User full.name
  IdentityFile ~/.ssh/work_rsa

If none match, the default fallback is id_rsa. But I'd like a different fallback. The following attempt failed, because it catches everything, overriding any previous settings.

Host '*'
  IdentityFile ~/.ssh/fallback

What is the correct way to express "none of the above"?

  • 1
    based on unix.stackexchange.com/questions/16571 I was thinking of defining Host '*' at the top – d3vid Apr 12 '18 at 15:01
  • 1
    What happens if you just put IdentityFile ~/.ssh/fallback outside of a Host block? – Harry Apr 12 '18 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.