News for hackers. Stuff that matters.
Re:File Transfer with SSH, Tee, and Base64 by Fnoord on Thursday September 17, 2020 @11:29AM (#24505845)
> If you don't have scp [...]

scp is deprecated [1]; use sftp instead. At the very least, sftp should be your preference over scp.

[1] https://unix.stackexchange.com/questions/571293/is-scp-unsaf...

Re:File Transfer with SSH, Tee, and Base64 by nrclark on Thursday September 17, 2020 @11:42AM (#24506000)
Scp works fine, I use it all the time. It's less complicated than sftp, and works basically just like the regular 'cp' command. It also doesn't require an sftp server to be present on the remote machine.

I'm not 100% sure I buy those "it's less secure" arguments in that Stack-exchange post, but even if true - lots of people use SSH to move stuff around inside an intranet, where both ends of the connection are trusted. In that kind of context, scp works great.

Re:File Transfer with SSH, Tee, and Base64 by tialaramex on Thursday September 17, 2020 @11:59AM (#24506246)
Which parts of the facts listed do you not "buy" ?

The fact that a remote server gets to silently respond to the request "Hey, I'd like funny-cat-noises.mp3" by writing two files, funny-cat-noises.mp3 and also .security/overrides.conf ?

Maybe your understanding of the protocol was that you allow a remote server to write whatever files it wants to your disk. That seems like a pretty crazy thing to want, but OK.

Most people assume it does what it seems like it does. You name one or more files on one machine, and they're copied to the other machine. SFTP can deliver without nasty surprises, but SCP can't really do so, although the OpenSSH team have worked pretty hard to make the worst surprises less likely to bite you.

Re:File Transfer with SSH, Tee, and Base64 by nrclark on Thursday September 17, 2020 @12:09PM (#24506389)
That sounds like it's an issue if one is copying from an untrusted server, for sure.

Maybe not an issue if you trust the machine you're copying to/from.

Re:File Transfer with SSH, Tee, and Base64 by Fnoord on Thursday September 17, 2020 @12:12PM (#24506429)
> Maybe not an issue if you trust the machine you're copying to/from.

Maybe you shouldn't. After all, the remote machine doesn't have root on your machine. Even if you are root on the remote machine, how can you know the server isn't compromised? You can't.

Re:File Transfer with SSH, Tee, and Base64 by fulafel on Thursday September 17, 2020 @11:47AM (#24506069)
Your link doesn't say it's deprecated...

the sftp command has lousy ux, it's unlikely people will switch to it en masse.

Re:File Transfer with SSH, Tee, and Base64 by Fnoord on Thursday September 17, 2020 @12:09PM (#24506396)
> 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. [1]

> From The Jargon File (version 4.4.7, 29 Dec 2003) [jargon]:

> deprecated adj.

> Said of a program or feature that is considered obsolescent and in the process of being phased out, usually in favor of a specified replacement. [..]

[1] https://www.openssh.com/txt/release-8.0

Re:File Transfer with SSH, Tee, and Base64 by fulafel on Thursday September 17, 2020 @12:36PM (#24506773)
But your cited definition agrees with me? It's not being phased out, hence not being deprecated.
Re:File Transfer with SSH, Tee, and Base64 by V6HBGNQHU on Thursday September 17, 2020 @01:04PM (#24507139)
> 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.
Re:File Transfer with SSH, Tee, and Base64 by fulafel on Thursday September 17, 2020 @02:05PM (#24507911)
I'm not sure what the misunderstanding is here.. The above text says there are better protocols and recommends their use over scp, but doesn't say scp is being phased out or discontinued in the future.

On *ix things stay around for pretty long. You still have ed and ftp on Ubuntu 20.04!

Re:File Transfer with SSH, Tee, and Base64 by xorcist on Thursday September 17, 2020 @01:09PM (#24507189)
rsync has pretty much identical ux to scp and is actively maintained.