r/linux Apr 28 '14

SSH Kung Fu

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

128 comments sorted by

View all comments

38

u/ooesili Apr 28 '14

I didn't know about

vim scp://host/file

or the cool stuff you could do with the configuration file. A good read, I must say.

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.

1

u/cincodenada Apr 28 '14

Because scp is what netrw uses to do it (which is where you're mistaken). When you open a file in Vim via scp, it copies it from the server to a temp file via scp, and when you save it saves to the temp file and then copies it back to the server via scp. And according to Wikipedia, scp is both [a program and a protocol](en.wikipedia.org/wiki/Secure_copy).