I have a remote CentOS server, lets pretend it's called hostname.com
hostname.com has several user accounts, and I want to ssh into this server as any one of these users (using ssh keys rather than password).
It seems everyone recommends just changing my local ssh config, add an alias the server for each remote user, and then providing a different IdentityFile for each alias.
So then I have to ssh bob@aliased_hostname1
and ssh alice@aliased_hostname2
Are there any other solutions? Id rather not be ssh'ing into aliased hostnames
Ideally I want to just ssh [email protected]
or ssh [email protected]
and automatically choose the correct ssh keyfile, based on the remote username i'm trying to log in as.