Skip to main content
Fix indentation
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k

You should be able to do this with the Match directive e.g.

  Host host2
    HostName host2.some.dom.ain
    Match user user1  
      IdentityFile ~/.ssh/id_user1  
    Match user user2
      Identityfile ~/.ssh/id_user2

You should be able to do this with the Match directive e.g.

  Host host2
    HostName host2.some.dom.ain
    Match user user1  
      IdentityFile ~/.ssh/id_user1  
    Match user user2
      Identityfile ~/.ssh/id_user2

You should be able to do this with the Match directive e.g.

Host host2
  HostName host2.some.dom.ain
  Match user user1  
    IdentityFile ~/.ssh/id_user1  
  Match user user2
    Identityfile ~/.ssh/id_user2
Source Link
steeldriver
  • 83.9k
  • 12
  • 124
  • 175

You should be able to do this with the Match directive e.g.

  Host host2
    HostName host2.some.dom.ain
    Match user user1  
      IdentityFile ~/.ssh/id_user1  
    Match user user2
      Identityfile ~/.ssh/id_user2