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
127.0.0.1 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
127.0.0.2 darkhelmet.edumate darkhelmet
10.0.0.22 db2workgroup db2workgroup
[root][skroob] nslookup darkhelmet
Server: 10.0.0.10
Address: 10.0.0.10#53
Name: darkhelmet.edumate
Address: 10.0.0.22
Your
nslookup
would indicate that10.0.0.10
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):
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.
darkhelmet
darkhelmet
In this case, you need to edit
/etc/hosts
on the machines that you want to connect todarkhelmet
on (but you can also do this ondarkhelmet
if you want it to be able to connect back to itself asdh
).e.g.
where
1.1.1.1
represents the IP thatdarkhelmet
has. That wayssh dh
andhttp://dh/
will work as expected.