From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B972A5A02AF for ; Tue, 30 Apr 2024 12:05:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1714471543; bh=/0ibf7afVNJEruzMZDNYxVZwe/Dj+GE/AiIYr33v7ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pCF3unRSTMjpncLigvC2nzGXyNQYCu5fia1UL1804fPmk2n1WdASRjxY5tR/ne4yH tg7m1R5raD6lFYCmaa6JOdZoiSg+Blje9aBgAOzzI6BEFv8HjzXD/Aw+1JhT9iHc/j YMic1iauX5QDa5+wRRj5g046SRWlV2RmLIVTevwUa0YHP3q24ubU7wCd0AS4iJzWSe O7snfs9jtQkl+99AP8Xx3deH5qsmunFlapFEl5gz8o+vkRecLcc9ipBCkKcSQ9GKGh RMJzTpgVPAnD2WmGPReMJ8eDLuUUjtI/Q3IW+ANVhGTTTl1iJR5AiVypgJ5N1VkUYR gSysB86y1JcQw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4VTG6b2lV7z4xM6; Tue, 30 Apr 2024 20:05:43 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/7] test: Allow sftp via vsock-ssh in tests Date: Tue, 30 Apr 2024 20:05:35 +1000 Message-ID: <20240430100541.381350-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240430100541.381350-1-david@gibson.dropbear.id.au> References: <20240430100541.381350-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 7PHC6SGCZV2MBKQT4VY2SAVKR5TVK5HS X-Message-ID-Hash: 7PHC6SGCZV2MBKQT4VY2SAVKR5TVK5HS X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- test/passt.mbuto | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/passt.mbuto b/test/passt.mbuto index 6240d5c1..436eecc5 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 -- 2.44.0