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>
This commit is contained in:
parent
eea5d3ef2d
commit
fcd9308856
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue