With the proposed package:
root@xenial-ssh-reload:~# ps fxaw
PID TTY STAT TIME COMMAND
1 ? Ss 0:02 /sbin/init
55 ? Ss 0:00 /lib/systemd/systemd-journald
...
2443 ? Ss 0:00 /usr/sbin/sshd -D
Note the sshd pid: 2443
Reload fails after the config file is corrupted, as expected:
root@xenial-ssh-reload:~# echo "blah blah" >>/etc/ssh/sshd_config
root@xenial-ssh-reload:~# systemctl reload ssh
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
But service is still running as before, same pid:
root@xenial-ssh-reload:~# ps fxaw
PID TTY STAT TIME COMMAND
1 ? Ss 0:02 /sbin/init
...
2443 ? Ss 0:00 /usr/sbin/sshd -D
And status agrees:
root@xenial-ssh-reload:~# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) (Result: exit-code) since Wed 2018-10-10 18:00:30 UTC; 1min 55s ago
Process: 2491 ExecReload=/usr/sbin/sshd -t (code=exited, status=255)
Process: 2442 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 2443 (sshd)
Tasks: 1
Memory: 1.5M
CPU: 24ms
CGroup: /system.slice/ssh.service
└─2443 /usr/sbin/sshd -D
Oct 10 18:00:30 xenial-ssh-reload systemd[1]: Starting OpenBSD Secure Shell server...
Oct 10 18:00:30 xenial-ssh-reload sshd[2443]: Server listening on 0.0.0.0 port 22.
Oct 10 18:00:30 xenial-ssh-reload sshd[2443]: Server listening on :: port 22.
Oct 10 18:00:30 xenial-ssh-reload systemd[1]: Started OpenBSD Secure Shell server.
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: Reloading OpenBSD Secure Shell server.
Oct 10 18:01:01 xenial-ssh-reload sshd[2491]: /etc/ssh/sshd_config: line 89: Bad configuration option: blah
Oct 10 18:01:01 xenial-ssh-reload sshd[2491]: /etc/ssh/sshd_config: terminating, 1 bad configuration options
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: ssh.service: Control process exited, code=exited status=255
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: Reload failed for OpenBSD Secure Shell server.
Note how it logged that there was a bad config option (as a result of calling sshd -t before the actual reload).
Could you please double check? For me, this update is fine.
@tronde, I just tried and the fix worked for me.
With the proposed package: ssh-reload: ~# ps fxaw systemd- journald
root@xenial-
PID TTY STAT TIME COMMAND
1 ? Ss 0:02 /sbin/init
55 ? Ss 0:00 /lib/systemd/
...
2443 ? Ss 0:00 /usr/sbin/sshd -D
Note the sshd pid: 2443
Reload fails after the config file is corrupted, as expected: ssh-reload: ~# echo "blah blah" >>/etc/ ssh/sshd_ config ssh-reload: ~# systemctl reload ssh
root@xenial-
root@xenial-
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
But service is still running as before, same pid: ssh-reload: ~# ps fxaw
root@xenial-
PID TTY STAT TIME COMMAND
1 ? Ss 0:02 /sbin/init
...
2443 ? Ss 0:00 /usr/sbin/sshd -D
And status agrees: ssh-reload: ~# systemctl status ssh system/ ssh.service; enabled; vendor preset: enabled) /usr/sbin/ sshd -t (code=exited, status=255) /usr/sbin/ sshd -t (code=exited, status=0/SUCCESS) slice/ssh. service
root@xenial-
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/
Active: active (running) (Result: exit-code) since Wed 2018-10-10 18:00:30 UTC; 1min 55s ago
Process: 2491 ExecReload=
Process: 2442 ExecStartPre=
Main PID: 2443 (sshd)
Tasks: 1
Memory: 1.5M
CPU: 24ms
CGroup: /system.
└─2443 /usr/sbin/sshd -D
Oct 10 18:00:30 xenial-ssh-reload systemd[1]: Starting OpenBSD Secure Shell server... sshd_config: line 89: Bad configuration option: blah sshd_config: terminating, 1 bad configuration options
Oct 10 18:00:30 xenial-ssh-reload sshd[2443]: Server listening on 0.0.0.0 port 22.
Oct 10 18:00:30 xenial-ssh-reload sshd[2443]: Server listening on :: port 22.
Oct 10 18:00:30 xenial-ssh-reload systemd[1]: Started OpenBSD Secure Shell server.
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: Reloading OpenBSD Secure Shell server.
Oct 10 18:01:01 xenial-ssh-reload sshd[2491]: /etc/ssh/
Oct 10 18:01:01 xenial-ssh-reload sshd[2491]: /etc/ssh/
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: ssh.service: Control process exited, code=exited status=255
Oct 10 18:01:01 xenial-ssh-reload systemd[1]: Reload failed for OpenBSD Secure Shell server.
Note how it logged that there was a bad config option (as a result of calling sshd -t before the actual reload).
Could you please double check? For me, this update is fine.