Search code examples
cygwinwindowsdomainaccount

Cygwin user name without domain


I am working on a windows machine that is maintained by our IT department. My user account me lives in a domain dom, which leads to my cygwin user name being dom+me. This is inconvenient because my user name is just me on all other machines that I want to talk to with ssh and so on. Is there a way to remove or hide the dom+ part from cygwin?

Some additional details: My cygwin home directory is /home/me, so that part is fine. Whoami replies dom+me, ssh asks for dom+me's password if I do not specify a user name.


Solution

  • ssh can be told to override the default user name by adding the following lines to the file ~/.ssh/config:

    Host *
        User me
    

    Afterwards, ssh and scp use the default user name me.