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

The openSUSE server name is 'darkhelmet'. I want to create an alias 'dh' for it. So I can also type 'ssh dh' and 'http://dh' would work too.

What file/files and where do I have to edit to make this happen?

Extract from /etc/hosts from darkhelmet       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts       darkhelmet.edumate darkhelmet       db2workgroup db2workgroup

[root][skroob] nslookup darkhelmet


Name:   darkhelmet.edumate
share|improve this question
What is your local DNS setup? – Andrew Jun 29 '12 at 0:32
I have no idea. How can I find out? – Radek Jun 29 '12 at 0:33
Your nslookup output shows it as - see the answer below. – Andrew Jun 29 '12 at 1:13
up vote 4 down vote accepted

Your nslookup would indicate that provides a DNS server. Do you have access to it? If not, then unfortunately you're out of luck.

Since you don't have access to the server, you'll need to ask the admin to add this entry to the zone file (or one to this effect):

dh.edumate.    IN CNAME darkhelmet.edumate.

Assuming that you (all) have search edumate in your /etc/resolve.conf.

I'm going to leave this previous answer for reference, otherwise this entire process won't make too much sense to others:

I am assuming you have at least 2 machines.

  1. darkhelmet
  2. All the other other ones that need to connect to darkhelmet

In this case, you need to edit /etc/hosts on the machines that you want to connect to darkhelmet on (but you can also do this on darkhelmet if you want it to be able to connect back to itself as dh).

e.g.    dh

where represents the IP that darkhelmet has. That way ssh dh and http://dh/ will work as expected.

share|improve this answer
Would this change be picked up automatically or do I have to do/restart something? – Radek Jun 29 '12 at 0:20
It would depend on the tool, most of the time it's picked up automatically and instantly. Try ping dh at a terminal and see if it resolves to the IP or not. – Jay Jun 29 '12 at 0:21
I added dh to this like darkhelmet.edumate darkhelmet. ping dh from dh works but not from other server on the network. ping darkhelmet from the same server works. – Radek Jun 29 '12 at 0:24
oh. I got it now. Is there any way I can do that at one place? Like name server or something like that? – Radek Jun 29 '12 at 0:25
For that, you'll need to tell us more about your setup. If you can tell us how all the other servers can already resolve darkhelmet to an IP, it should be the same method to alias it to dh – Jay Jun 29 '12 at 0:28

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.