Re: sshd won't start -- no error message
From: David Liontooth (liontooth_at_cogweb.net)
Date: 02/05/04
- Previous message: Rice.Dana_at_ic.gc.ca: "AIX and w"
- Maybe in reply to: David Liontooth: "sshd won't start -- no error message"
- Next in thread: Greg Wooledge: "Re: sshd won't start -- no error message"
- Reply: Greg Wooledge: "Re: sshd won't start -- no error message"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 04 Feb 2004 20:38:38 -0800 To: Zaigui Wang <ZWANG@altera.com>, secureshell@securityfocus.com
Zaigui Wang wrote:
>What do you have in your /etc/init.d/ssh?
>
>-----Original Message-----
>From: David Liontooth [mailto:liontooth-at-cogweb.net]
>Sent: Tuesday, February 03, 2004 2:42 PM
>To: secureshell@securityfocus.com
>Subject: sshd won't start -- no error message
>
>Greetings --
>
>I'm having difficulties starting ssh as a daemon in Debian sid. My
>version is 3.6.1p2-11. When I issue
>
>/etc/init.d/ssh start
>
>I get the normal "Starting OpenBSD Secure Shell server: sshd", but in
>fact nothing starts (or at least it terminates at once -- I can't see
>anything even starting).
>
>In contrast, when I issue simply
>
>/usr/sbin/sshd -D
>
>then ssh starts and works fine. Has anyone encountered this problem?
>There is no trace of any errors in the logs.
>
>I'm baffled and would very much appreciate suggestions.
>
>Please cc me.
>
>Cheers,
>David
>
>
Hi Zaigui --
It's the default for Debian sid -- pretty basic stuff. I'll add the
strace below too, in case someone can decipher it!
Cheers,
David
# cat /etc/init.d/ssh
#! /bin/sh
set -e
# /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemon
test -x /usr/sbin/sshd || exit 0
( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
if test -f /etc/default/ssh; then
. /etc/default/ssh
fi
check_for_no_start() {
# forget it if we're trying to start, and
/etc/ssh/sshd_not_to_be_run exists
if [ -e /etc/ssh/sshd_not_to_be_run ]; then
echo "OpenBSD Secure Shell server not in use
(/etc/ssh/sshd_not_to_be_run)"
exit 0
fi
}
check_privsep_dir() {
# Create the PrivSep empty dir if necessary
if [ ! -d /var/run/sshd ]; then
mkdir /var/run/sshd
chmod 0755 /var/run/sshd
fi
}
check_config() {
if [ ! -e /etc/ssh/sshd_not_to_be_run ]; then
/usr/sbin/sshd -t || exit 1
fi
}
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
start)
check_for_no_start
check_privsep_dir
echo -n "Starting OpenBSD Secure Shell server: sshd"
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid
--exec /usr/sbin/sshd -- $SSHD_OPTS
echo "."
;;
stop)
echo -n "Stopping OpenBSD Secure Shell server: sshd"
start-stop-daemon --stop --quiet --oknodo --pidfile
/var/run/sshd.pid
echo "."
;;
reload|force-reload)
check_for_no_start
check_config
echo -n "Reloading OpenBSD Secure Shell server's configuration"
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile
/var/run/sshd.pid --exec /usr/sbin/sshd
echo "."
;;
restart)
check_config
echo -n "Restarting OpenBSD Secure Shell server: sshd"
start-stop-daemon --stop --quiet --oknodo --pidfile
/var/run/sshd.pid
check_for_no_start
check_privsep_dir
sleep 2
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid
--exec /usr/sbin/sshd -- $SSHD_OPTS
echo "."
;;
*)
echo "Usage: /etc/init.d/ssh
{start|stop|reload|force-reload|restart}"
exit 1
esac
exit 0
# strace -f sshd
execve("/usr/sbin/sshd", ["sshd"], [/* 14 vars */]) = 0
uname({sys="Linux", node="paco", ...}) = 0
brk(0) = 0x80903f0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=47141, ...}) = 0
old_mmap(NULL, 47141, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libwrap.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240!\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=25860, ...}) = 0
old_mmap(NULL, 30724, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40024000
old_mmap(0x4002a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x5000) = 0x4002a000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libpam.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\10\25\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=28884, ...}) = 0
old_mmap(NULL, 31944, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002c000
old_mmap(0x40033000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x6000) = 0x40033000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\34\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9796, ...}) = 0
old_mmap(NULL, 8632, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40034000
old_mmap(0x40036000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x2000) = 0x40036000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \16\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=7732, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40037000
old_mmap(NULL, 10636, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40038000
old_mmap(0x4003a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x1000) = 0x4003a000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libz.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\27\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=67304, ...}) = 0
old_mmap(NULL, 66268, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003b000
old_mmap(0x4004b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x10000) = 0x4004b000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20<\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=73452, ...}) = 0
old_mmap(NULL, 84864, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004c000
old_mmap(0x4005e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x11000) = 0x4005e000
old_mmap(0x4005f000, 7040, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4005f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/usr/lib/i686/cmov/libcrypto.so.0.9.7", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\270"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=969092, ...}) = 0
old_mmap(NULL, 986660, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40061000
old_mmap(0x4013d000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xdb000) = 0x4013d000
old_mmap(0x4014f000, 11812, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4014f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`^\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1243076, ...}) = 0
old_mmap(NULL, 1253316, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40152000
old_mmap(0x40279000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x126000) = 0x40279000
old_mmap(0x40282000, 8132, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40282000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40284000
munmap(0x40018000, 47141) = 0
brk(0) = 0x80903f0
brk(0x80b13f0) = 0x80b13f0
brk(0) = 0x80b13f0
brk(0x80b2000) = 0x80b2000
getpid() = 15727
getpid() = 15727
open("/dev/urandom", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 3
select(4, [3], NULL, NULL, {0, 10000}) = 1 (in [3], left {0, 10000})
read(3, "\23p\214jB\350.\24\24\274Z`H~\201\334\203I\r\312ze\301"..., 32)
= 32
close(3) = 0
getpid() = 15727
getpid() = 15727
getuid32() = 0
getpid() = 15727
time(NULL) = 1075955469
getpid() = 15727
open("/etc/ssh/sshd_config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2076, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
read(3, "# Package generated configuratio"..., 4096) = 2076
getuid32() = 0
getuid32() = 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40018000, 4096) = 0
open("/etc/ssh/ssh_host_rsa_key", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=883, ...}) = 0
getuid32() = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=883, ...}) = 0
read(3, "-----BEGIN RSA PRIVATE KEY-----\n"..., 883) = 883
_llseek(3, 0, [0], SEEK_SET) = 0
fcntl64(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fstat64(3, {st_mode=S_IFREG|0600, st_size=883, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, "-----BEGIN RSA PRIVATE KEY-----\n"..., 4096) = 883
getpid() = 15727
time([1075955469]) = 1075955469
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
getpid() = 15727
close(3) = 0
munmap(0x40018000, 4096) = 0
open("/etc/ssh/ssh_host_dsa_key", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=668, ...}) = 0
getuid32() = 0
fstat64(3, {st_mode=S_IFREG|0600, st_size=668, ...}) = 0
read(3, "-----BEGIN DSA PRIVATE KEY-----\n"..., 668) = 668
_llseek(3, 0, [0], SEEK_SET) = 0
fcntl64(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fstat64(3, {st_mode=S_IFREG|0600, st_size=668, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, "-----BEGIN DSA PRIVATE KEY-----\n"..., 4096) = 668
close(3) = 0
munmap(0x40018000, 4096) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40018000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=47141, ...}) = 0
old_mmap(NULL, 47141, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\22\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=27412, ...}) = 0
old_mmap(NULL, 30508, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40285000
old_mmap(0x4028c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x6000) = 0x4028c000
close(3) = 0
munmap(0x40018000, 47141) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=47141, ...}) = 0
old_mmap(NULL, 47141, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\34\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=32304, ...}) = 0
old_mmap(NULL, 35564, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4028d000
old_mmap(0x40295000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x7000) = 0x40295000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\35\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=34436, ...}) = 0
old_mmap(NULL, 33720, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40296000
old_mmap(0x4029e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x8000) = 0x4029e000
close(3) = 0
munmap(0x40018000, 47141) = 0
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
_llseek(3, 0, [0], SEEK_CUR) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1474, ...}) = 0
mmap2(NULL, 1474, PROT_READ, MAP_SHARED, 3, 0) = 0x40018000
_llseek(3, 1474, [1474], SEEK_SET) = 0
munmap(0x40018000, 1474) = 0
close(3) = 0
stat64("/var/run/sshd", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
setgroups32(0, 0) = 0
fork(Process 15728 attached
) = 15728
[pid 15727] exit_group(0) = ?
[pid 15728] --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
setsid() = 15728
chdir("/") = 0
open("/dev/null", O_RDWR) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=7242, ...}) = 0
close(3) = 0
time([1075955469]) = 1075955469
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"...,
4096) = 1017
close(3) = 0
munmap(0x40018000, 4096) = 0
getpid() = 15728
rt_sigaction(SIGPIPE, {0x40225be0, [], SA_RESTORER, 0x4017b498},
{SIG_DFL}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_UNIX, path="/dev/log"}, 16) = 0
send(3, "<34>Feb 4 20:31:09 sshd[15728]:"..., 64, 0) = 64
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
close(3) = 0
exit_group(255) = ?
Process 15728 detached
- Previous message: Rice.Dana_at_ic.gc.ca: "AIX and w"
- Maybe in reply to: David Liontooth: "sshd won't start -- no error message"
- Next in thread: Greg Wooledge: "Re: sshd won't start -- no error message"
- Reply: Greg Wooledge: "Re: sshd won't start -- no error message"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|