summaryrefslogtreecommitdiffstats
path: root/debian/tests/socket-activation
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:59:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 07:59:59 +0000
commit13905124bd7eeb0aa8b62ec6a230603eed7cbca1 (patch)
tree136dbb22731bcf6d1add7ab08496054dce237878 /debian/tests/socket-activation
parentReleasing progress-linux version 1:9.8p1-1~progress7.99u1. (diff)
downloadopenssh-13905124bd7eeb0aa8b62ec6a230603eed7cbca1.tar.xz
openssh-13905124bd7eeb0aa8b62ec6a230603eed7cbca1.zip
Merging debian version 1:9.8p1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/tests/socket-activation27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/tests/socket-activation b/debian/tests/socket-activation
new file mode 100755
index 0000000..20a0d0b
--- /dev/null
+++ b/debian/tests/socket-activation
@@ -0,0 +1,27 @@
+#! /bin/sh
+set -e
+
+testuser="testuser$$"
+adduser --quiet --disabled-password --gecos "" "$testuser"
+sudo -u "$testuser" mkdir -m700 "/home/$testuser/.ssh"
+sudo -u "$testuser" \
+ ssh-keygen -t ed25519 -N '' -f "/home/$testuser/.ssh/id_ed25519"
+sudo -u "$testuser" \
+ cp "/home/$testuser/.ssh/id_ed25519.pub" \
+ "/home/$testuser/.ssh/authorized_keys"
+
+cleanup () {
+ if [ $? -ne 0 ]; then
+ echo "## Something failed"
+ echo
+ echo "## ssh server log"
+ journalctl -b -u ssh.service --lines 100
+ fi
+}
+
+trap cleanup EXIT
+
+systemctl disable --now ssh.service
+systemctl enable --now ssh.socket
+sudo -u "$testuser" \
+ ssh -oStrictHostKeyChecking=accept-new "$testuser@localhost" date