Mailing List Archive

[openssh] 01/01: upstream: Switch scp back to use the old protocol by default, ahead of
This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 277d3c6adfb128b4129db08e3d65195d94b55fe7
Author: djm@openbsd.org <djm@openbsd.org>
Date: Mon Sep 20 01:55:42 2021 +0000

upstream: Switch scp back to use the old protocol by default, ahead of

release. We'll wait a little longer for people to pick up sftp-server(8) that
supports the extension that scp needs for ~user paths to continue working in
SFTP protocol mode. Discussed with deraadt@

OpenBSD-Commit-ID: f281f603a705fba317ff076e7b11bcf2df941871
---
scp.1 | 24 ++++++++++--------------
scp.c | 4 ++--
2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/scp.1 b/scp.1
index 8234ddf9..d154e12c 100644
--- a/scp.1
+++ b/scp.1
@@ -8,9 +8,9 @@
.\"
.\" Created: Sun May 7 00:14:37 1995 ylo
.\"
-.\" $OpenBSD: scp.1,v 1.103 2021/09/10 07:11:11 dtucker Exp $
+.\" $OpenBSD: scp.1,v 1.104 2021/09/20 01:55:42 djm Exp $
.\"
-.Dd $Mdocdate: September 10 2021 $
+.Dd $Mdocdate: September 20 2021 $
.Dt SCP 1
.Os
.Sh NAME
@@ -76,9 +76,7 @@ The options are as follows:
Copies between two remote hosts are transferred through the local host.
Without this option the data is copied directly between the two remote
hosts.
-Note that, when using the legacy SCP protocol (via the
-.Fl O
-flag), this option
+Note that, when using the original SCP protocol (the default), this option
selects batch mode for the second host as
.Nm
cannot ask for passwords or passphrases for both hosts.
@@ -111,7 +109,7 @@ This option is directly passed to
.Xr ssh 1 .
.It Fl D Ar sftp_server_path
When using the SFTP protocol support via
-.Fl M ,
+.Fl s ,
connect directly to a local SFTP server program rather than a
remote one via
.Xr ssh 1 .
@@ -143,12 +141,13 @@ This option is directly passed to
.It Fl l Ar limit
Limits the used bandwidth, specified in Kbit/s.
.It Fl O
-Use the legacy SCP protocol for file transfers instead of the SFTP protocol.
+Use the original SCP protocol for file transfers instead of the SFTP protocol.
Forcing the use of the SCP protocol may be necessary for servers that do
not implement SFTP, for backwards-compatibility for particular filename
wildcard patterns and for expanding paths with a
.Sq ~
prefix for older SFTP servers.
+This mode is the default.
.It Fl o Ar ssh_option
Can be used to pass options to
.Nm ssh
@@ -258,6 +257,8 @@ to use for the encrypted connection.
The program must understand
.Xr ssh 1
options.
+.It Fl s
+use the SFTP protocol for transfers rather than the original scp protocol.
.It Fl T
Disable strict filename checking.
By default when copying files from a remote host to a local directory
@@ -294,17 +295,12 @@ debugging connection, authentication, and configuration problems.
is based on the rcp program in
.Bx
source code from the Regents of the University of California.
-.Pp
-Since OpenSSH 8.8,
-.Nm
-has use the SFTP protocol for transfers by default.
.Sh AUTHORS
.An Timo Rinne Aq Mt tri@iki.fi
.An Tatu Ylonen Aq Mt ylo@cs.hut.fi
.Sh CAVEATS
-The legacy SCP protocol (selected by the
-.Fl O
-flag) requires execution of the remote user's shell to perform
+The original SCP protocol (used by default) requires execution of the
+remote user's shell to perform
.Xr glob 3
pattern matching.
This requires careful quoting of any characters that have special meaning to
diff --git a/scp.c b/scp.c
index 7c8420d2..e1ee3d9d 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.237 2021/09/18 02:03:25 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.238 2021/09/20 01:55:42 djm Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -448,7 +448,7 @@ main(int argc, char **argv)
const char *errstr;
extern char *optarg;
extern int optind;
- enum scp_mode_e mode = MODE_SFTP;
+ enum scp_mode_e mode = MODE_SCP;
char *sftp_direct = NULL;

/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */

--
To stop receiving notification emails like this one, please contact
djm@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits