Suppose I am working with three machines. I'm logged into host
"workstation" and I would like to ssh to hosts "remote0" and "remote1".
"id_dsa" and "id_dsa.pub" exist on "workstation". I've added
"id_dsa.pub" from "workstation" to "authorized_keys2" on hosts "remote0"
and "remote1". I've used "ssh-add" on "workstation" to add my private
key to the ssh agent. Nothing unusual here. Just wanted to be
detailed.
Let's say my username on "workstation" is "jeff". My username on
"remote0" is also "jeff", however my username on "remote1" is "foo".
I can "ssh remote0" and am able to log in without further prompting.
All works well. On the other hand, I have to specify my username in
"ssh foo@remote1" when connecting to "remote1". This is, of course,
because my username on "workstation" and "remote1" differ.
I'm curious if there is a way I can configure ssh to automatically use
the username "foo" when connecting to "remote1".