change default username when ssh to another pc

Posted by Tom on Super User See other posts from Super User or by Tom
Published on 2011-07-04T14:59:49Z Indexed on 2012/09/11 3:41 UTC
Read the original article Hit count: 617

Filed under:
|
|

When I ssh between different pcs I can omit my username (tom) and just type

ssh pc_name

instead of

ssh tom@pc_name

I like this feature, and have got into the habit of using it.

Unfortunately, on one of my computers I went for the user name tommy. Everytime I connect to this computer I forget to write tommy@creative_pc and wonder why my password doesn't work. Is there a way to tell ssh what user name to use when the username is omitted?

Edit: Just found the following question that is similar: How to make ssh log in as the right user? It didn't come up on my initial search.

© Super User or respective owner

Related posts about ssh

Related posts about openssh