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 at offwriting.org> 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 at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
On Thu, Jan 24, 2019 at 12:00:48PM -0800, Jim Knoble wrote:> 3. 'scp' stays, but becomes the CLI for SFTP, and the SCP protocol breaks.Why does "scp becomes the CLI for SFTP" necessitate "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.Wasn't that part of generally adding "2" as a suffix to all their command names when adding v2 protocol support? -- Colin Watson [cjwatson at debian.org]
Hi, On Thu, Jan 24, 2019 at 08:26:39PM +0000, Colin Watson wrote:> On Thu, Jan 24, 2019 at 12:00:48PM -0800, Jim Knoble wrote: > > 3. 'scp' stays, but becomes the CLI for SFTP, and the SCP protocol breaks. > > Why does "scp becomes the CLI for SFTP" necessitate "the SCP protocol > breaks"?The way scp works today is "run ssh to the remote, then invoke scp with a few extra options". So if "the program named scp" will no longer provide the server side functionality, it would break *older* scp clients trying to talk "scp-the-old-protocol" to *newer* ssh installations. Now, of course, the "scp-that-does-sftp" binary could have an understanding for the old scp-server-side options... but that sounds like a maintenance annoyance. gert -- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress Gert Doering - Munich, Germany gert at greenie.muc.de
On 2019-01-24 12:26, Colin Watson wrote:> On Thu, Jan 24, 2019 at 12:00:48PM -0800, Jim Knoble wrote: >> 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. > Wasn't that part of generally adding "2" as a suffix to all their > command names when adding v2 protocol support?Yes; however, the 'scp2' command was also transitioned to use the SFTP protocol at the same time, as I recall.SSH.COM's website implies that (but does not seem to provide the history): https://www.ssh.com/ssh/sftp/#sec-SCP-Command-on-Linux .? I'm unable to find any other historical reference offhand that backs up my memory, so take that for what it's worth.? That said, it's not a bad idea. (-: -- jim knoble
Seemingly Similar Threads
- OL8 (RHEL8), ssh-rsa turned off using update-crypto-policies, receiving an openssh error that I don't seem to be able to override in my personal .ssh/config file
- OL8 (RHEL8), ssh-rsa turned off using update-crypto-policies, receiving an openssh error that I don't seem to be able to override in my personal .ssh/config file
- Adding SNI support to SSH
- Request for a Lockdown option
- sftp Vs scp