Add sshd.service file to cleanly close ssh sessions.

This commit is contained in:
Kim Hagen 2016-02-09 02:59:28 -05:00
parent a70d19d2fd
commit a83d97ef4e

View File

@ -0,0 +1,16 @@
[Unit]
Description=OpenBSD Secure Shell server
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/usr/bin/killall sshd
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=sshd.service