I would like to access a remote host using a short name. On a system where I have admin rights, I would achieve this by adding an entry in /etc/hosts file, something like this shortname

Is it possible to achieve this using some other method which does not require modifying /etc/hosts or other admin level or system wide changes?

  • 1
    Depends on why you want to create aliases. If its because you want to SSH to the short-name, you can use the Host and HostName configuration options in your SSH config. Maybe if your more specific about what you're trying to accomplish, you'll get some more useful feedback. – tdk2fe Mar 15 '14 at 5:04

I think you should lookup your local-network-name. Most routers seem to set some kind of hostname-system. a fritzbox uses hostname.fritz.box for example, a thompson device uses hostname.lan, and its not unlikely your router has something to offer as well.

I take it you dont have access to the routers interface to set a DNS record? That would be the easiest way to accomplish it totally to your guidelines

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