[ydl-gen] setting the host name from the command line

Christopher Murtagh christopher.murtagh at gmail.com
Thu Jul 13 11:42:26 MDT 2006


On 7/12/06, Nathan Moore <nmoore at physics.umn.edu> wrote:
> I've installed YDL 3.0.1 on several machines in my lab.  I'm familiar
> with the System Setting->Network application from the main Gnome
> menu, but can't figure out how to hget "under the hood" to set
> network preferences.

Well, I'm not familiar with Gnome much, because I use KDE primarily,
however, you should be able to run the command
'system-config-network', which I *believe* was there in YDL 3.

> Specifically, now that YDL is installed on the machines, I can access
> them externally with ssh by using their mac address,
> ie
>         ssh 0-30-65-bd-4-w5 or ssh 0-30-65-bd-4-w5.ourschool.edu

 Ok, this is not normal behaviour as SSH works over TCP/IP. This would
mean that '0-30-65-bd-4-w5.ourschool.edu' would have to be in DNS
somewhere (possibly only available internally). To confirm this, try
typing 'nslookup 0-30-65-bd-4-w5.ourschool.edu' at the command line.
The reason why the pekin hostname is failing is that it likely isn't
in DNS. You'll need to confirm that with your LAN admin.

> What text file should I be editing for this sort of machine name
> aliasing to work?
>
> the contents of /etc/hosts is presently,
>
> 127.0.0.1       localhost.localdomain           localhost
> 127.0.0.2       pekin.ourschool.edu             pekin

127.0.0.2 is not a valid IP address on a network, it is reserved for
loop-back devices only (basically, the machine pointing to itself).
What machine are you editing your hosts file? On 'pekin' itself, or
another machine? If you're doing it on 'pekin' this won't have any
effect, other than possibly confusing pekin every now and then. If
you're doing this on another machine, you need to supply pekin's real
IP address.

> which allows me (from pekin) to "ssh pekin" successfully, however,
> this doesn't allow me to ssh from other machines to pekin.

Ahh, should have read this first. Ok, setting your /etc/hosts file on
pekin only affects pekin. It's basically a shortcut to bypass a DNS
lookup. Unless you have a good reason to (as in you want to define
hostnames for machines that aren't in DNS or you want to protect a
machine from DNS attacks), you generally don't want to touch your
/etc/hosts file. If you need other machines to be able to get to pekin
as pekin.yourschool.edu, you need to contact the person responsible
for DNS in your area. They can do this for you.

Cheers,

Chris

P.S. If you're still using YDL 3.x, you might want to try upgrading to
YDL 4.1. It's well worth it, especially if it's a desktop machine
running X.


More information about the yellowdog-general mailing list