Hello,
I'm having trouble with OpenSSH on Linux.
Here is attached the regression tests log - it'll explain what my
problems are. This cause sshd to die with this output:
buffer_get: trying to get more bytes 1 than in buffer 0
ssh would also dies with this message. I recreated my user keys, and it
works now. remote sshd is 3.7.1p2.
But sshd won't start even after recreating server keys. Even after
recreating moduli file as explained in man ssh-keygen.
I'm running Lunar Linux (source based distro), with kernel 2.4.24, glibc
2.3.2, gcc 3.2.3. I have an AMD uP.
I tried to debug sshd with gdb but I can't find any clue at this stage.
strace tells me that sshd, after opening /etc/ssh/ssh_host_key calls
read with size=0 ( read(3, "", 0) = 0 ). That sounds weird, isn't
it ?
Please help, thank you in advance,
Couannette
Log:
root at bubus /usr/src/openssh-3.8p1 # make tests
(cd openbsd-compat && make)
make[1]: Entering directory `/usr/src/openssh-3.8p1/openbsd-compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/openssh-3.8p1/openbsd-compat'
BUILDDIR=`pwd`; \
[ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \
[ -f `pwd`/regress/Makefile ] || \
ln -s ./regress/Makefile `pwd`/regress/Makefile ; \
TEST_SHELL="/bin/bash"; \
TEST_SSH_SSH="${BUILDDIR}/ssh"; \
TEST_SSH_SSHD="${BUILDDIR}/sshd"; \
TEST_SSH_SSHAGENT="${BUILDDIR}/ssh-agent"; \
TEST_SSH_SSHADD="${BUILDDIR}/ssh-add"; \
TEST_SSH_SSHKEYGEN="${BUILDDIR}/ssh-keygen"; \
TEST_SSH_SSHKEYSCAN="${BUILDDIR}/ssh-keyscan"; \
TEST_SSH_SFTP="${BUILDDIR}/sftp"; \
TEST_SSH_SFTPSERVER="${BUILDDIR}/sftp-server"; \
cd ./regress || exit $?; \
make \
.OBJDIR="${BUILDDIR}/regress" \
.CURDIR="`pwd`" \
BUILDDIR="${BUILDDIR}" \
OBJ="${BUILDDIR}/regress/" \
PATH="${BUILDDIR}:${PATH}" \
TEST_SHELL="${TEST_SHELL}" \
TEST_SSH_SSH="${TEST_SSH_SSH}" \
TEST_SSH_SSHD="${TEST_SSH_SSHD}" \
TEST_SSH_SSHAGENT="${TEST_SSH_SSHAGENT}" \
TEST_SSH_SSHADD="${TEST_SSH_SSHADD}" \
TEST_SSH_SSHKEYGEN="${TEST_SSH_SSHKEYGEN}" \
TEST_SSH_SSHKEYSCAN="${TEST_SSH_SSHKEYSCAN}" \
TEST_SSH_SFTP="${TEST_SSH_SFTP}" \
TEST_SSH_SFTPSERVER="${TEST_SSH_SFTPSERVER}" \
EXEEXT="" \
tests
make[1]: Entering directory `/usr/src/openssh-3.8p1/regress'
ssh-keygen -if /usr/src/openssh-3.8p1/regress/rsa_ssh2.prv | diff -
/usr/src/openssh-3.8p1/regress/rsa_openssh.prv
cat /usr/src/openssh-3.8p1/regress/rsa_openssh.prv >
/usr/src/openssh-3.8p1/regress//t2.out
chmod 600 /usr/src/openssh-3.8p1/regress//t2.out
ssh-keygen -yf /usr/src/openssh-3.8p1/regress//t2.out | diff -
/usr/src/openssh-3.8p1/regress/rsa_openssh.pub
buffer_get: trying to get more bytes 1 than in buffer 0
0a1> ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDsilwKcaKN6wSMNd1WgQ9+HRqQEkD0kCTVttrazGu0OhBU3Uko+dFD1Ip0CxdXmN25JQWxOYF7h/Ocu8P3jzv3RTX87xKR0YzlXTLX+SLtF/ySebS3xWPrlfRUDhh03hR5V+8xxvvy9widPYKw/oItwGSueOsEq1LTczCDv2dAjQ=make[1]:
*** [t2] Error 1
make[1]: Leaving directory `/usr/src/openssh-3.8p1/regress'
make: *** [tests] Error 2
root at bubus /usr/src/openssh-3.8p1 #
excerpt of sshd strace ouput:
open("/etc/ssh/sshd_config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=2425, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
read(3, "#\t$OpenBSD: sshd_config,v 1.59 2"..., 4096) = 2425
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40017000, 4096) = 0
open("/etc/ssh/ssh_host_key", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=525, ...}) = 0
getuid32() = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=525, ...}) = 0
brk(0) = 0x809a000
brk(0x809b000) = 0x809b000
read(3, "", 0) = 0
write(2, "buffer_get: trying to get more b"..., 57buffer_get: trying
to
get more bytes 1 than in buffer 0
) = 57
exit_group(255) = ?