OpenBSD Journal

By default, scp(1) now uses SFTP protocol

Contributed by rueda on from the saner-future-than-past dept.

Thanks to a commit by Damien Miller (djm@), scp(1) (in -current) now defaults to using the SFTP protocol:

CVSROOT:	/cvs
Module name:	src
Changes by:	djm@cvs.openbsd.org	2021/09/08 17:31:39

Modified files:
	usr.bin/ssh    : scp.1 scp.c 

Log message:
Use the SFTP protocol by default. The original scp/rcp protocol remains
available via the -O flag.

Note that ~user/ prefixed paths in SFTP mode require a protocol extension
that was first shipped in OpenSSH 8.7.

ok deraadt, after baking in snaps for a while without incident

As explained in the OpenSSH Release Notes,

SFTP offers more predictable filename handling and does not require expansion of glob(3) patterns via the shell on the remote side.

(Comments are closed)


Comments
  1. By John McCue (jmcunx) jmcq66@comcast.net on

    Nice work! On a proprietary UNIX at work, I have been slowly converting scripts from scp to sftp due to what I have read regarding scp.

    I hope that vendor takes this as a hint and do the same (or better yet move to OpenSSH).

    Comments
    1. By Darren Tucker (dtucker) dtucker@openbsd.org on

      Out of curiosity can you tell us which proprietary Unix this is that ships with an SSH implementation that's not based on OpenSSH? The last one I am aware of was Tru64 or whatever it was called time.

      Comments
      1. By John McCue (jmcunx) jmcq66@comcast.net on

        Sorry, I selected report by accident, my mouse jumped

        Well color me surprised, AIX uses OpenSSH. I never looked but just assumed. The version the systems I am on is 1.2.1

        Thanks for making me look :)

  2. By d.c. (d.c.) on

    Well, I am using scp on a regular basis every day. Mostly (but not only) because it's capable of those "evil" globs.

    In some situations it's just an extra work to replace it, sometimes it's a bit more difficult.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]