Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All my boxes have the same username for myself, except one legacy machine where I'm loath to try to change it. Whenever I ssh to the machine, I forget to specify my user name, and my password is rejected. This only takes maybe 30 seconds, but it should only take 3, so it's a PIA.

Is there any way to configure that machine to recognize the incoming username and map it to another, correct, one?

I'd really like to configure this on the server itself if possible. Configuring each client is less ideal, especially since I like to muck with my various installations and VM's quite a bit.

share|improve this question

In your ~/.ssh/config:

host otherhostname
user otherusername

Then it'll use otherusername when you $ ssh otherhostname.

share|improve this answer
while this works, it requires maintenance. Whenever I do a clean install, or make a new VM, etc, I'll need to look up this post. Is there any way to get this done on the server side? – bukzor Mar 12 '11 at 18:14
FWIW, I keep around and periodically update a vanilla tarball of my home directory to bootstrap new accounts on new machines, VMs, etc. – geekosaur Mar 12 '11 at 18:25
@bukzor - anything other than stock config is going to require maintenance. From my experience, there's no way to do this on the server side. At it's root, this is a client-side issue and as such, should be dealt with on the client side. – EEAA Mar 12 '11 at 19:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.