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.
> 
> Ralph, the failure message was "ssh: connect to host jd-Dimension-5000
> port 22: Connection refused".

OK, that means jd-Dimension-5000 could be turned into an IP address but
no SSH daemon was listening on the default port of 22 so the machine
clearly responded with a "nothing's listening, connection refused".  So
jd-Dimension-5000 didn't become the 192.168.1.5 you give above but
something else;  something that doesn't run sshd on port 22.

To find out what you could use strace to observe the connect(2) system
call that's getting the error from the kernel.  That will show the IP
address that ssh has already worked out as it is passed to the kernel.
Here, I've pretended it's 1.2.3.4.  Other connects might fail beforehand
but they aren't interesting ones so I've elided them.

    $ strace -e connect ssh jd-Dimension-5000
    ...
    connect(3, {sa_family=AF_INET, sin_port=htons(22),
        sin_addr=inet_addr("1.2.3.4")}, 16) = -1 ECONNREFUSED (Connection 
refused)
    ssh: connect to host jd-Dimension-5000 port 22: Connection refused
    $

The IP address ssh it uses might give a clue.  The other place to look
is 

    $ cat /etc/host.conf
    # The "order" line is only used by old versions of the C library.
    order hosts,bind
    multi on
    $

which normally says that /etc/hosts should be consulted before trying
the "bind" method.  Perhaps /etc/hosts contains an old definition for
jd-Dimension-5000?

> PS The above looks a bit of a mess.  How should I reply to replies?

It wasn't too bad.  You deleted a lot of the extra stuff.  I'm not too
sure what to suggest other than watch what others do and see what you
like and dislike.  Many just type their lines at the top, where the
cursor is initially placed, without deleting any of the ever-growing
quoted reply that follows.  :-)

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

Reply via email to