2

I'm on trusty (14.04.2 LTS). current version of openssh=6.6 (OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3, OpenSSL 1.0.1f 6 Jan 2014)

Was told to upgrade to openssh=6.9 or greater.

Why does the ssh daemon now not properly start/stop via upstart?

Here is what I did...

Downloaded 6.9 tarball (openssh-6.9p1.tar.gz).

processed thusly (all as root):

cd openssh-6.9p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --libexecdir=/usr/lib/openssh
make
stop ssh  ;(stopped properly)
make install

Hangs during upstart launch...

start ssh  ;(control-c to escape)

I can see the NEW daemon is running, and I can actually ssh into the box. The new version nows...

ssh -V
OpenSSH_6.9p1, OpenSSL 1.0.1f 6 Jan 2014

Also tried:

initctl --system start ssh

Rebooted. ssh into box OK. Can see service running via: ps aux | grep ssh

The process ID in /var/run/sshd.pid matches what I saw in the above ps.

stop ssh  ; hangs - control-c to escape.

I actually went thru the trouble of downloading a debian 6.9 package and extracting the contents. The upstart script in there is the same as what version 6.6 is using (I've not mucked w/ it).

Current /etc/init/ssh.conf content:

# ssh - OpenBSD Secure Shell server
#
# The OpenSSH server provides secure shell access to the system.

description "OpenSSH server"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

env SSH_SIGSTOP=1
expect stop

# 'sshd -D' leaks stderr and confuses things in conjunction with 'console log'
console none

pre-start script
    test -x /usr/sbin/sshd || { stop; exit 0; }
    test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

    mkdir -p -m0755 /var/run/sshd
end script

# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
# 'exec' line here instead
exec /usr/sbin/sshd -D
Jack
  • 21
  • You may want to try upgrading to Wily Werewolf using this guide – Grammargeek Dec 03 '15 at 21:09
  • hunt for errors in log or try to run the server in debug mode. Installing any software from source, that needs close integration with operating system, is a tricky think if you don't use the same configuration and downstream patches as the maintainers. – Jakuje Dec 03 '15 at 22:48

0 Answers0