I'm trying to configure my ssh_config (CLIENT) to use different keyfiles depending on the user for the same host, but unable to make it work. What is wrong? It says bad arument
Host myServer
Hostname myServer.net
Match #bad argument at this line
Host myServer
User jhon
IdentityFile ~/.ssh/jhon
Match
User foo
IdentityFile ~/.ssh/foo
----------------------->[SOLVED]<-----------------------
Host myServer
Hostname myServer.net
Match user jhon host "myserver.net"
IdentityFile ~/.ssh/jhon
Match user foo host "myserver.net"
IdentityFile ~/.ssh/foo
Host another
User anyOtherOneUser
Hostname another.net
# any other configuration
Match user jhon host "another.net"
IdentityFile ~/.ssh/jhon-another
Match user foo "another.net"
IdentityFile ~/.ssh/foo-another