OpenSSH server not working - connection closed

Dan Nicholson dbn.lists at gmail.com
Mon Aug 15 11:57:21 PDT 2005


Hi,

I installed openssh-4.1p1 from blfs-6.1, and I'm having trouble getting 
the server to work.  I've used the book instructions except not with 
static openssl libs or kerberos.  Also, I changed the CFLAG in Makefile 
from -mcpu=pentium to -march=pentium3.  Maybe that's the problem, but 
seems unlikely.

Anyway, the server starts OK according to the bootscript, and it even 
sits patiently under the daemon mode.  Then I try to login and it 
crashes with the message Connection closed by 67.160.78.67 before I can 
attempt to enter a password or anything.

So I restarted sshd with
root # /usr/sbin/sshd -d -d -d -D
and logged the output.  I've attached it because it's rather large.

I then issued the most basic login attempt with high verbosity
dbnichol $ ssh -v -v -v dbnichol at 127.0.0.1
(again log attached)

Here's where the daemon goes wrong:
<snip long output>
debug1: userauth-request for user dbnichol service ssh-connection method 
keyboard-interactive
debug1: attempt 1 failures 1
debug2: input_userauth_request: try method keyboard-interactive
debug1: keyboard-interactive devs
debug1: auth2_challenge: user=dbnichol devs=
debug1: kbdint_alloc: devices ''
debug2: auth2_challenge_start: devices
Failed keyboard-interactive for dbnichol from 67.160.78.67 port 35571 ssh2
debug3: Normalising mapped IPv4 in IPv6 address
debug3: Trying to reverse map address 67.160.78.67.
debug1: do_cleanup

Which is strange because I'm never offered a chance to use the keyboard 
for authentication.  Here's what the client says:
<snip>
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
Connection closed by 67.160.78.67

What I think is failing is that sshd is trying to use IPv6 and it's not 
gonna happen on my machine (I think).  Earlier in the daemon log there 
is this message:
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.

That seems like a serious issue to me.  And I don't know what would be 
using that port besides sshd.  (Yes, I checked that there wasn't a 
running process already.)  I saw on a Googling that someone had a 
similar problem with IPv4 and IPv6 trying to use the same address. 
Another thing I noticed when I started thinking about IPv6 was to look 
at /var/log/sys.log.  Here's some things that might be relevant:

Aug 15 04:03:46 conor bootlog:  Starting dhclient on the eth0 
interface...[  OK  ]
Aug 15 04:03:46 conor bootlog:  Adding IPv4 address 67.160.78.67 to the 
eth0 interface...[  OK  ]
Aug 15 04:03:46 conor bootlog:  Initializing kernel random number 
generator...[  OK  ]
Aug 15 04:03:47 conor kernel: NET: Registered protocol family 10
Aug 15 04:03:47 conor kernel: Disabled Privacy Extensions on device 
c052eb40(lo)
Aug 15 04:03:47 conor kernel: IPv6 over IPv4 tunneling driver
Aug 15 04:03:47 conor bootlog:  Starting SSH Server...[  OK  ]
< snip udev creates some devices >
Aug 15 04:03:57 conor kernel: eth0: no IPv6 routers present

Sorry for the long post, but I wasn't sure what would be relevant and 
what wouldn't.  Thanks in advance to anyone who knows how to address 
this problem.

Dan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ssh-debug.log
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20050815/b3627e6e/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sshd-debug.log
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20050815/b3627e6e/attachment-0001.ksh>


More information about the blfs-support mailing list