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 6D1AD5A02FD for ; Wed, 1 May 2024 10:31:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1714552272; bh=/0ibf7afVNJEruzMZDNYxVZwe/Dj+GE/AiIYr33v7ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HtF+I3elmwr3rJisspfsFJKKkN4qiPzfYhbgFXPnwbBVJCjC1rgJtvAhPRZMMMJYR g/H9j6jaXpDZAmLrJ5tyzn+x3DI7IAmIjiwn7oxCScQV2xzg1uOW09jxyybJBCYI70 7M7RnJC/F4k0gQNYNc/f6XXNB51zXtUiKKMgRmjTmnNVmAEGPxNZjAmXB2J/zCTct+ YqqtA7Cjrr0yQjRd3uLuuTDRuxXy71VtpKL9FrXDxTtH3v/BEAByFj1jVV+3vBForI ikw1mNjZ5kqqvlbweAQYwap+yjsdI80OM5TIJ7GAgDhffkcWTsym0vPmtOlhgrcGc8 eh1Q92S2OQ1Sw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4VTqz44QNJz4x11; Wed, 1 May 2024 18:31:12 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v2 1/7] test: Allow sftp via vsock-ssh in tests Date: Wed, 1 May 2024 18:31:04 +1000 Message-ID: <20240501083110.2172770-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240501083110.2172770-1-david@gibson.dropbear.id.au> References: <20240501083110.2172770-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: GLEUCR4AJBBVW2S7ZJXC4OH5AV3J3CGN X-Message-ID-Hash: GLEUCR4AJBBVW2S7ZJXC4OH5AV3J3CGN 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