Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #166812

searching for hosts in domain local

From Dan Hitt <dan.hitt@gmail.com>
Newsgroups linux.debian.user
Subject searching for hosts in domain local
Date 2016-04-17 07:20 +0200
Message-ID <roNhL-7uX-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


In my local network, the machines generally know each other by names like
    first_host.local
    second_host.local
    third_host.local
    ...

So if i'm on first_host, i can ssh to second_host with
    ssh my_account@second_host.local
and i can ping second_host by
    ping second_host.local

I would like to drop the '.local' because it's an extra six characters
with absolutely no value.

In principle, i think it should be possible to by just adding
     search local
to my /etc/resolv.conf, but this absolutely does not work.  (I imagine that
local is a really magic name in some contexts but not very magic in others.)

Furthermore, /etc/resolv.conf doesn't want to be written, as it
says it is generated automatically, so even if it worked, it wouldn't
be such a good solution.

I can sort of fix the situation by editing ~/.ssh/config and adding lines
    Host second_host
        Hostname second_host.local
but this has the disadvantage that i have to do it for every host on
the network, and it only affects ssh --- ping and presumably every
other command (naturally!) do not consult this file.

(I don't have any influence over my router which comes from
my service provider, but i wouldn't want to change it even if
i could, since i'm just asking my own machine to intercept
a name like second_host and convert it to second_host.local
before processing further.)

Thanks in advance for any clues or references to man pages
or even other mailing lists.

dan

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

searching for hosts in domain local Dan Hitt <dan.hitt@gmail.com> - 2016-04-17 07:20 +0200
  Re: searching for hosts in domain local Andy Smith <andy@strugglers.net> - 2016-04-17 07:50 +0200
    Re: searching for hosts in domain local Andy Smith <andy@strugglers.net> - 2016-04-17 13:00 +0200
      Re: searching for hosts in domain local Dan Hitt <dan.hitt@gmail.com> - 2016-04-17 18:50 +0200
        Re: searching for hosts in domain local David Wright <deblis@lionunicorn.co.uk> - 2016-04-17 22:40 +0200
          Re: searching for hosts in domain local Dan Hitt <dan.hitt@gmail.com> - 2016-04-18 03:40 +0200
    Re: searching for hosts in domain local Dan Hitt <dan.hitt@gmail.com> - 2016-04-17 14:40 +0200
      Re: searching for hosts in domain local David Wright <deblis@lionunicorn.co.uk> - 2016-04-17 22:20 +0200
  Re: searching for hosts in domain local David Wright <deblis@lionunicorn.co.uk> - 2016-04-17 22:00 +0200

csiph-web