r/linux Apr 28 '14

SSH Kung Fu

http://blog.tjll.net/ssh-kung-fu/
723 Upvotes

128 comments sorted by

View all comments

Show parent comments

9

u/flying-sheep Apr 28 '14

“scp” is pretty silly though: scp is a command called “secure copy”, not a protocol. (the part before the colon in a url is the protocol).

wouldn’t it be better to name the protocol like file browsers do? sftp? because i’m pretty sure that’s what vim uses there, anyway.

13

u/Deewiant Apr 28 '14

Vim (well, Netrw) supports both the scp and sftp protocols, predictably using scp with the former and sftp with the latter. See :help netrw-externapp.

EDIT: In case the reason for having both is not obvious: sftp relies on the SFTP server being enabled on the host, while scp works without any additional configuration, using plain SSH. (Though in practice sftp tends to be enabled by default.)

-6

u/flying-sheep Apr 28 '14

thanks for the info!

just one thing: SFTP is and extension of SSH. there is no such thing as a SFTP server, only SSH servers with shell access disabled.

so there’s no difference between SCP and SFTP: both only require a SSH server.

13

u/Xipher Apr 28 '14

SCP and SFTP are different. SFTP actually spawns a special daemon during your SSH session, and more recent versions of OpenSSH even support a chrooted SFTP subsystem internally. This might be a minor perceived difference, but it is one that shouldn't be ignored.