I almost never use bare 'scp' or 'sftp' anymore; I start with either 'rsync' or, if 'rsync' is not present and not installable on one end or the other, the "tar-over-bare-ssh" approach: ``` tar cf - localpath | ssh remote.host 'cd remotepath && tar xvf -' ``` I'd be in favor of one of the following: 1. 'scp' goes away, and support for file transfer via CLI is added to 'sftp'. 2. 'scp' goes away, and support for file transfer via CLI is changed to, "use rsync or something-over-bare-ssh instead, good luck". 3. 'scp' stays, but becomes the CLI for SFTP, and the SCP protocol breaks. 4. 'scp' goes away, and a new 's'-command[*] is created that does file transfer via CLI, possibly using SFTP. The old proprietary SSHv2 did #4, with the new command called 'scp2', and a long tail for the transition while 'scp' and 'scp2' coexisted. ____________________ [*]: For example, "sput", "scpx", or for fun, "Secure Copying Remote Artifacts Program" = "scrap". -- jim knoble > On Jan 24, 2019, at 10:27, Ben Lindstrom <mouring@xxxxxxxxxxxxxx> wrote: > > Corinna Vinschen wrote on 1/24/19 6:28 AM: >> What's missing in sftp is a drop in replacement mode for copying to >> the remote server, i.e. this should work out of the box: >> >> $ sftp -rp local_dir server:path >> >> But, alas: >> >> ssh: Could not resolve hostname local_dir: Name or service not known >> >> If sftp had this mode, I would alias scp=sftp and be done with it. >> > If memory serves the argument was "if we are calling it an ftp client then it should act like an ftp client." And sadly most ftp clients don't provide a command-line push UI which is why I abandoned my patch. > > I know Damien Miller about a year or so later asked if I had the patch still, but by that point I had already left the project due to time constrains and deleted all my local code. So maybe if presented again with something more "ftpish" it could be accepted: > > sftp -rp -U /path/to/transfer [user@]server:path > > Description: > > -U upload a local file or directory (if -r is used) to the remotely server and path. > > > Damien, Darren? Does that seem like a reasonable thing that may be accepted upstream for sftp? > > I know it isn't a "UI replacement" but it at least provides a more complete UI for phasing people off of scp. > > Ben > > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev@xxxxxxxxxxx > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev