[Dorset] Can I use hostnames with ssh without editing /etc/hosts

2013-08-12 Thread JD
Thanks to several people who have given links for cross-compiling to a 
Pi, e.g. the toolchain and the Baking Pi tutorials.


My problem is that I would like to use hostnames and not IP addresses 
when linking between 3 Linux computers that are just connected via my 
router.


The router has the correct hostname for each computer but I get a 
refusal if I try, say, jd@jd-Dimension-5000, whereas jd@192.168.1.5 
works.  In principle, the IP addresses change so I'd rather use 
hostnames.  I admit that the IP addresses don't change very often, but I 
turn the router off whenever I go away so the addresses get reassigned 
and that is a pain.


BTW, the router is a Huawei and I get the IP addresses from the DHCP page.

Thanks,
John

--
Next meeting:  Bournemouth, Tuesday, 2013-08-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread on mailing list:  mailto:dorset@mailman.lug.org.uk
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] Can I use hostnames with ssh without editing /etc/hosts

2013-08-12 Thread Tim Allen

Hi John


On 12/08/13 14:04, JD wrote:

Thanks to several people who have given links for cross-compiling to a
Pi, e.g. the toolchain and the Baking Pi tutorials.

My problem is that I would like to use hostnames and not IP addresses
when linking between 3 Linux computers that are just connected via my
router.

The router has the correct hostname for each computer but I get a
refusal if I try, say, jd@jd-Dimension-5000, whereas jd@192.168.1.5
works. In principle, the IP addresses change so I'd rather use
hostnames. I admit that the IP addresses don't change very often, but I
turn the router off whenever I go away so the addresses get reassigned
and that is a pain.

BTW, the router is a Huawei and I get the IP addresses from the DHCP page.



There's nothing to stop you using your Pi as a DNS and DHCP server - you 
then have full control. I'm using a Pi for exactly this with Bind and 
ISC DHCP server. You can assign static IP's on the clients or stick to 
DHCP and have ISC DHCP server assign then based on the client MAC's.



Cheers

Tim

--
Next meeting:  Bournemouth, Tuesday, 2013-08-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread on mailing list:  mailto:dorset@mailman.lug.org.uk
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] Can I use hostnames with ssh without editing /etc/hosts

2013-08-12 Thread Andrew

On 12/08/2013 14:04, JD wrote:
My problem is that I would like to use hostnames and not IP addresses 
when linking between 3 Linux computers that are just connected via my 
router.


The router has the correct hostname for each computer but I get a 
refusal if I try, say, jd@jd-Dimension-5000, whereas jd@192.168.1.5 
works.  In principle, the IP addresses change so I'd rather use 
hostnames.  I admit that the IP addresses don't change very often, but 
I turn the router off whenever I go away so the addresses get 
reassigned and that is a pain.




Does hostnale.local work? Eg. jd-Dimension-5000.local?

--

Andrew.



--
Next meeting:  Bournemouth, Tuesday, 2013-08-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread on mailing list:  mailto:dorset@mailman.lug.org.uk
How to Report Bugs Effectively:  http://goo.gl/4Xue


Re: [Dorset] Can I use hostnames with ssh without editing /etc/hosts

2013-08-12 Thread Ralph Corderoy
Hi John,

 The router has the correct hostname for each computer but I get a
 refusal if I try, say, jd@jd-Dimension-5000, whereas jd@192.168.1.5
 works.

By refusal do you mean connection refused?  It would help us if you
paste the shell line where you attempt it up to the next shell prompt.

Does ping with one of the IP addresses work, e.g. ping 192.168.1.5?
If so, does it with using respective hostname instead?

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2013-08-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread on mailing list:  mailto:dorset@mailman.lug.org.uk
How to Report Bugs Effectively:  http://goo.gl/4Xue