aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-05-01 18:31:04 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-05-02 16:13:36 +0200
commitfcd930885658c2149551c7dbfb2479c179c7990f (patch)
tree129519ca9494f7f54fb06a68e0d432241b544422
parenteea5d3ef2d797573fa390d7bbbd4518a529d9579 (diff)
downloadpasst-fcd930885658c2149551c7dbfb2479c179c7990f.tar
passt-fcd930885658c2149551c7dbfb2479c179c7990f.tar.gz
passt-fcd930885658c2149551c7dbfb2479c179c7990f.tar.bz2
passt-fcd930885658c2149551c7dbfb2479c179c7990f.tar.lz
passt-fcd930885658c2149551c7dbfb2479c179c7990f.tar.xz
passt-fcd930885658c2149551c7dbfb2479c179c7990f.tar.zst
passt-fcd930885658c2149551c7dbfb2479c179c7990f.zip
test: Allow sftp via vsock-ssh in tests
During some debugging recently, I wanted to extact a file from a test guest and found it was tricky, since the ssh-over-vsock setup we had didn't allow sftp/scp. We can fix this by adding a line to the guest side sshd config from mbuto. While we're there correct an inaccurate comment. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-xtest/passt.mbuto6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/passt.mbuto b/test/passt.mbuto
index 6240d5c..436eecc 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -54,7 +54,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 +64,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