From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7848 invoked from network); 14 Apr 2022 20:45:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Apr 2022 20:45:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1649969119; b=U8LJHTnkOYzzychurebIK9CaioTlbQRWSAjQr5PrI5p4sDve1UZ/lWb8y0zADy8mLup5nfBfQB iUThhDfM4F9Kxrh/mPyHOAap6WbrA6K/UgDCSF6Q/NH4Uw11Zwn8sjJDLH3CADgN3/6QsnTEmH guPz+Q0oVLvFHuLkK+gwqw52N6sRed30zZhKKwTZXn/onXKzsEif1srIFlYjwGevg1d5fSBa28 0eX7EU/Pzi9anRk1GKCSTElwj3I83l/3YFxU6UoMpuUYA5VJGhimIqYhC04c1QKgjD13EO+ttg 8nkWTbGsw1n6ZuKWFGQDD0AmI6R9XdEg7ntM5fge82GTxA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202202e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202202 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1649969119; bh=TEaE8iWg7ICvaX45TRSzXG53JUrvHHkBNO1D1mpl2Xg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=Ao86L2guelooSHFxu8QECyPCAO7gUb0HATUYipwc0076gPxO97mrLQ2/eqVewy0Cy7RWDY4BAz PTr0ZM26k4hGkffKVHdFPJZNfZPWjP7/jYdbT30mRn+PQENYPUFLBqk2I1RHTaeWRxQ3ONaqPM fU4fY+9y5tR8Uhh+16qPx4bZRUihdqpKRYqRk6TxhdsE+zXVBZbWhkfoaUxjM1qo004hsinxo5 A7ijk6ZTAI7r6uevNvDPskc5eJzjwQL+UayZFpiomqnMZ8nW3AxzOJfrOUWfEN/TsVEkZKUcjC jgJs3zzz2C28zPK1ROyd8xbgxr+VdiixBg4war7MCIRKgg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=nJPLed15dlyUL+ojAAtvCW1rB08J1KwGBESl+6wV4ro=; b=rljYCca/cAeKfzc5Smo10dWO4b X+BhXItGeIAXgbn78i/FM5HDcppG7pmYJ/PU9zzjsQkIv/HyJEThLqv03salgtnjIlIQ2TYfc7gwm 29iAAErr+E0rA1tiMWi4fyYyddXJRqRTl93qS4/vj3rj5ABjUxfuOm3ADB65tUUaRZN69LpaMT9l0 oizQ3piXGo/TpVfmPfDqZphRPG1PW/fAq1c0bisHSfWGsImyFkOPzeETaGcgV1XnGeJORzKCUAPTm NrLOy4L9RaCBFLdX88yiBNTWTlY6Yws5VIlBwM73PoSm1Q15yoRrPF9pYWjYGE7s5xwGOERV6zQCz lOX0TRug==; Received: from authenticated user by zero.zsh.org with local id 1nf6L3-000MQt-Eu; Thu, 14 Apr 2022 20:45:13 +0000 Authentication-Results: zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202202e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202202 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none Received: from mx.spodhuis.org ([94.142.241.89]:43513) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nf6KS-000M4a-Qi; Thu, 14 Apr 2022 20:44:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202202; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP:Organization :Auto-Submitted; bh=nJPLed15dlyUL+ojAAtvCW1rB08J1KwGBESl+6wV4ro=; t=1649969076; x=1651178676; b=GG3wX3dW3zOyj1qIhFVlXP9+9k1mbMuvuExUgVe683pEz9l 4GU9BMjQ9i5DkLGDJ7qzs3W+H3vfyoRGXnIo0FscInQySDVocuZU78p6IQwwAYyKKqv5XFJDFbl66 QcWMcum+uF9FY8EsOj19FR1ApQ9WYfGKQnFI8fuhFfTAHx9YwHfVMYD2tDv7h7tMIHc+HwaCyOv9m NLOmiKIuWqI0WlpfbA9jj+xYC6rnAogNwin9GNnophm2vNm3K0aG+Rjj0UhtLe7Xk/fST7RLvmt2d fOUCEE1PnExc4anAeZyy7Y5yExsqg+XDl/Y5MC0blnFn+wkCB5Qlb4sXfzMvsJHQ==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202202e2; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP:Organization :Auto-Submitted; bh=nJPLed15dlyUL+ojAAtvCW1rB08J1KwGBESl+6wV4ro=; t=1649969076; x=1651178676; b=MBtLoIvcifg1vgY9uMT7Qm+9nrp3V/qSNDRkqxamLewNl0e GK5LjKJFXVkcMLGwzcTmInXENINBGoue71AM1DQ==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nf6KS-000M4T-Dw; Thu, 14 Apr 2022 20:44:36 +0000 Date: Thu, 14 Apr 2022 16:44:33 -0400 From: Phil Pennock To: zsh-workers@zsh.org Subject: Re: OpenSSH scp completion reminder Message-ID: Mail-Followup-To: zsh-workers@zsh.org References: <20220414161814.k5jtyuzyony2axz5@sym.noone.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220414161814.k5jtyuzyony2axz5@sym.noone.org> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 50067 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 2022-04-14 at 18:18 +0200, Axel Beckert wrote: > I thought so as well, but I so far couldn't find anything which didn't > work with zsh remote file completion with OpenSSH 9.0 on the client > side. Otherwise I would have reported it. What version was the server running? With localhost being 9.0 for client and server and zsh 5.8, I see this reproduction case; setup, then the results of tab-completion, and then at the end a manually-constructed filename which definitely would not have worked with older scp. % pwd /home/pdp/t3 % ls -lR .: total 4 drwxr-xr-x 2 pdp pdp 4096 Apr 14 16:31 'foo bar'$'\t''baz' './foo bar'$'\t''baz': total 8 -rw-r--r-- 1 pdp pdp 4785 Apr 14 16:31 'An Artist - Foo Bar Baz.mp3' % cd ~/Downloads/t % scp localhost:t3/ % scp localhost:t3/foo\\\ bar\$\'\\t\'baz/An\\\ Artist\\\ -\\\ Foo\\\ Bar\\\ Baz.mp3 . /opt/openssh/bin/scp: t3/foo\\ bar$'\\t'baz/An\\ Artist\\ -\\ Foo\\ Bar\\ Baz.mp3: No such file or directory % scp $'localhost:t3/foo bar\tbaz/An Artist - Foo Bar Baz.mp3' . An Artist - Foo Bar Baz.mp3 100% 4785 2.1MB/s 00:00 % ssh -V OpenSSH_9.0p1, OpenSSL 1.1.1f 31 Mar 2020 So the good news is that scp in the new mode is "pass the filename exactly as it really is, no escaping for the remote side, whatever reaches us in argv[] is what will be used, so you only need to worry about local shell escaping". Note that scp(1) does not have a version flag, whereas ssh(1) does. It might be reasonable to expect them to be paired. Invoking `scp -O` exits 1 in both versions below, but you can see the output text differences. -O to use original SCP protocol, -s to use sftp protocol. -D is for local debugging. So I think full support means knowing the version, knowing which version switched the default behaviour (looks like 9.0 man-page might be wrong), and then knowing which options have been set on the command-line already for this version. OpenSSH 9.0: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target OpenSSH 8.6: /usr/bin/scp: unrecognized option: O usage: scp [-346ABCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target -Phil