The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,152 other subscribers

OpenSSH scp has defaulted to the SFTP protocol for some 9 months now

Posted by jpluimers on 2022/05/25

Since I will be bitten by this someday, here the september 2021 observation that [Wayback] By default, scp(1) now uses SFTP protocol.

The original scp/rcp protocol remains available via the -O flag.

It refers to the august 2021 announcement in the [Wayback] OpenSSH: Release Notes – OpenSSH 8.7/8.7p1 (2021-08-20) that scp supported SFTP (like the sftp tool) and that it would become default soon:

New features

 - scp(1): experimental support for transfers using the SFTP protocol
   as a replacement for the venerable SCP/RCP protocol that it has
   traditionally used. SFTP offers more predictable filename handling
   and does not require expansion of glob(3) patterns via the shell
   on the remote side.

   SFTP support may be enabled via a temporary scp -s flag. It is
   intended for SFTP to become the default transfer mode in the
   near future, at which time the -s flag will be removed. The -O
   flag exists to force use of the original SCP/RCP protocol for
   cases where SFTP may be unavailable or incompatible.

Yes, I know that scp is considered outdated since the Wayback – OpenSSH: Release Notes – OpenSSH 8.0/8.0p1 (2019-04-17):

The scp protocol is outdated, inflexible and not readily fixed. We
recommend the use of more modern protocols like sftp and rsync for
file transfer instead.

That is exactly the reason why I will be bitten: low-resource environments use other scp implementations than OpenSSH, for instance Dropbear (which often is used in Busybox based systems and even referred from [Wayback] BusyBox: External Tiny Utilities).

Those will take considerable time to implement the SFTP protocol, and then even more time to become available in firmwares for devices that have low-resource environments.

It means I need to remember the -O flag.

Via: [] Daniel 🥌 Stenberg on Twitter: “”By default, scp(1) now uses SFTP protocol.” Feels like room for some exciting confusion going forward!”


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: