2 ms·
> I wouldn't call sftp more modern. They're from the same time. No. scp was included in Tatu Ylönens original ssh in 1995. sftp is significantly newer, e.g. op
by jabl 7y ago
> I wouldn't call sftp more modern. They're from the same time.
No. scp was included in Tatu Ylönens original ssh in 1995. sftp is significantly newer, e.g. openssh gained both client and server implementation with the 2.5 release in 2001, and is dependent on the ssh 2.0 protocol.
> One is interactive, and the other isn't. Nothing more. Nothing less.
No. They are different network protocols. And per CVE-2019-6111 mentioned in the link I provided in the previous post, the scp protocol has some questionable semantics, which is why the openssh developers are recommending people to switch to better designed protocols such as sftp or rsync.
> So, if you're using it to load code for net booting, scp is the obvious choice since you want to automate the retrieval of a specific file from a specific place, to a specific destination. And you don't want to have to babysit it every time.
You can automate sftp as well. Fetching files is as simple as with scp, but uploading is more tedious, but doable if, for instance, you don't have rsync available. Something like "sftp -b - user@server:/path <<< 'put filename'".
> There are so many things wrong with the idea that rsync is more modern.
rsync is not a fundamentally broken network protocol like scp. And as another answer mentioned, you can tunnel rsync over ssh, which nowadays even is the default if you don't specify otherwise.