From 4722d4b7980d6fd8145e2e9f08492d951ea261d1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:26:58 +0200 Subject: Adding debian version 1:7.9p1-10+deb10u2. Signed-off-by: Daniel Baumann --- debian/systemd/rescue-ssh.target | 6 ++++++ debian/systemd/ssh-agent.override | 1 + debian/systemd/ssh-agent.service | 11 +++++++++++ debian/systemd/ssh-session-cleanup | 11 +++++++++++ debian/systemd/ssh-session-cleanup.service | 13 +++++++++++++ debian/systemd/ssh.service | 22 ++++++++++++++++++++++ debian/systemd/ssh.socket | 12 ++++++++++++ debian/systemd/ssh@.service | 11 +++++++++++ 8 files changed, 87 insertions(+) create mode 100644 debian/systemd/rescue-ssh.target create mode 100644 debian/systemd/ssh-agent.override create mode 100644 debian/systemd/ssh-agent.service create mode 100755 debian/systemd/ssh-session-cleanup create mode 100644 debian/systemd/ssh-session-cleanup.service create mode 100644 debian/systemd/ssh.service create mode 100644 debian/systemd/ssh.socket create mode 100644 debian/systemd/ssh@.service (limited to 'debian/systemd') diff --git a/debian/systemd/rescue-ssh.target b/debian/systemd/rescue-ssh.target new file mode 100644 index 0000000..9501b7f --- /dev/null +++ b/debian/systemd/rescue-ssh.target @@ -0,0 +1,6 @@ +[Unit] +Description=Rescue with network and ssh +Documentation=man:systemd.special(7) +Requires=network-online.target ssh.service +After=network-online.target ssh.service +AllowIsolate=yes diff --git a/debian/systemd/ssh-agent.override b/debian/systemd/ssh-agent.override new file mode 100644 index 0000000..2905494 --- /dev/null +++ b/debian/systemd/ssh-agent.override @@ -0,0 +1 @@ +manual diff --git a/debian/systemd/ssh-agent.service b/debian/systemd/ssh-agent.service new file mode 100644 index 0000000..cdc10bb --- /dev/null +++ b/debian/systemd/ssh-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH Agent +Documentation=man:ssh-agent(1) +Before=graphical-session-pre.target +ConditionPathExists=/etc/X11/Xsession.options +Wants=dbus.socket +After=dbus.socket + +[Service] +ExecStart=/usr/lib/openssh/agent-launch start +ExecStopPost=/usr/lib/openssh/agent-launch stop diff --git a/debian/systemd/ssh-session-cleanup b/debian/systemd/ssh-session-cleanup new file mode 100755 index 0000000..f283cc9 --- /dev/null +++ b/debian/systemd/ssh-session-cleanup @@ -0,0 +1,11 @@ +#! /bin/sh + +ssh_session_pattern='sshd: \S.*@pts/[0-9]+' + +IFS="$IFS@" +pgrep -a -f "$ssh_session_pattern" | while read pid daemon user pty; do + echo "Found ${daemon%:} session $pid on $pty; sending SIGTERM" + kill "$pid" || true +done + +exit 0 diff --git a/debian/systemd/ssh-session-cleanup.service b/debian/systemd/ssh-session-cleanup.service new file mode 100644 index 0000000..b867272 --- /dev/null +++ b/debian/systemd/ssh-session-cleanup.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenBSD Secure Shell session cleanup +Wants=network.target +After=network.target + +[Service] +ExecStart=/bin/true +ExecStop=/usr/lib/openssh/ssh-session-cleanup +RemainAfterExit=yes +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/debian/systemd/ssh.service b/debian/systemd/ssh.service new file mode 100644 index 0000000..7495d9a --- /dev/null +++ b/debian/systemd/ssh.service @@ -0,0 +1,22 @@ +[Unit] +Description=OpenBSD Secure Shell server +Documentation=man:sshd(8) man:sshd_config(5) +After=network.target auditd.service +ConditionPathExists=!/etc/ssh/sshd_not_to_be_run + +[Service] +EnvironmentFile=-/etc/default/ssh +ExecStartPre=/usr/sbin/sshd -t +ExecStart=/usr/sbin/sshd -D $SSHD_OPTS +ExecReload=/usr/sbin/sshd -t +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartPreventExitStatus=255 +Type=notify +RuntimeDirectory=sshd +RuntimeDirectoryMode=0755 + +[Install] +WantedBy=multi-user.target +Alias=sshd.service diff --git a/debian/systemd/ssh.socket b/debian/systemd/ssh.socket new file mode 100644 index 0000000..5a766dc --- /dev/null +++ b/debian/systemd/ssh.socket @@ -0,0 +1,12 @@ +[Unit] +Description=OpenBSD Secure Shell server socket +Before=ssh.service +Conflicts=ssh.service +ConditionPathExists=!/etc/ssh/sshd_not_to_be_run + +[Socket] +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/debian/systemd/ssh@.service b/debian/systemd/ssh@.service new file mode 100644 index 0000000..f7fec1f --- /dev/null +++ b/debian/systemd/ssh@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenBSD Secure Shell server per-connection daemon +Documentation=man:sshd(8) man:sshd_config(5) +After=auditd.service + +[Service] +EnvironmentFile=-/etc/default/ssh +ExecStart=-/usr/sbin/sshd -i $SSHD_OPTS +StandardInput=socket +RuntimeDirectory=sshd +RuntimeDirectoryMode=0755 -- cgit v1.2.3