3 ms·
It's an intentional security thing. If the sftp subsystem command failed OpenSSH could fall back to scp automatically, but there are some security issues with t
by wahern 11mo ago
It's an intentional security thing. If the sftp subsystem command failed OpenSSH could fall back to scp automatically, but there are some security issues with that. Certain semantics, e.g. file name expansions, differ between scp and sftp on the backend, with the potential for some (theoretical?) exploits. IIRC, in particular, scp is invoked on the remote server through the shell, passing file names and commands as parameters, with shell expansion occurring. Whereas sftp file names and commands are issued in-band to the remote sftp subsystem using an additional protocol layer. (In theory the sftp protocol could be wrapped in TLS; it's independent of the SSH protocol itself.)
- yjftsjthsd-h 11mo agoIt's my understanding that this kind of thing, possibly combined with actual code quality concerns(?), is exactly why they're replacing the scp protocol with sftp; as https://www.openssh.org/txt/release-8.0 https://www.openssh.org/txt/release-8.0 notes, 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.