aboutgitcodebugslistschat
path: root/test/passt.mbuto
diff options
context:
space:
mode:
Diffstat (limited to 'test/passt.mbuto')
-rwxr-xr-xtest/passt.mbuto16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/passt.mbuto b/test/passt.mbuto
index 6240d5c..138d365 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -15,6 +15,14 @@ PROGS="${PROGS:-ash,dash,bash ip mount ls insmod mkdir ln cat chmod lsmod
sed tr chown sipcalc cut socat dd strace ping tail killall sleep sysctl
nproc tcp_rr tcp_crr udp_rr which tee seq bc sshd ssh-keygen cmp}"
+# OpenSSH 9.8 introduced split binaries, with sshd being the daemon, and
+# sshd-session the per-session program. We need the latter as well, and the path
+# depends on the distribution. It doesn't exist on older versions.
+for bin in /usr/lib/openssh/sshd-session /usr/lib/ssh/sshd-session \
+ /usr/libexec/openssh/sshd-session; do
+ command -v "${bin}" >/dev/null && PROGS="${PROGS} ${bin}"
+done
+
KMODS="${KMODS:- virtio_net virtio_pci vmw_vsock_virtio_transport}"
LINKS="${LINKS:-
@@ -54,7 +62,7 @@ EOF
ln -s /run /var/run
:> /etc/fstab
- # sshd(dropbear) via vsock
+ # sshd via vsock
cat > /etc/passwd << EOF
root:x:0:0:root:/root:/bin/sh
sshd:x:100:100:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
@@ -64,7 +72,9 @@ root:::0:99999:7:::
EOF
chmod 000 /etc/shadow
- :> /etc/ssh/sshd_config
+ cat > /etc/ssh/sshd_config << EOF
+Subsystem sftp internal-sftp
+EOF
ssh-keygen -A
chmod 700 /root/.ssh
chmod 700 /run/sshd
@@ -76,7 +86,7 @@ EOF
EOF
chmod 600 /root/.ssh/authorized_keys
chmod 700 /root
- socat VSOCK-LISTEN:22,fork EXEC:"sshd -i -e" 2> /var/log/vsock-ssh.log &
+ socat VSOCK-LISTEN:22,fork EXEC:"/sbin/sshd -i -e" 2> /var/log/vsock-ssh.log &
sh +m
'