Difference between scp and sftp

SCP is the abbreviation of 'secure copy', while SFTP stands for 'secure FTP'.

The first is used to copy one or more files, often with known names, from host A to host B, whereas the second is mostly used interactively, analogue to an FTP client. SCP will always work out of the box and has little in the field of tweakable options. SFTP can be used with different backends to present the SFTP service to the user. It would even possible to turn it off, though I haven't tried this.

That's the difference in use.

As far as performance goes: ErikA below links to a wikipedia page which mentions SCP is generally faster than SFTP because of a more efficient algorithm in SCP.


sftp is an interactive program used by human in a shell session scp is mostly an one-liner used in scripts to transfer/copy files


That's like asking the difference between cp and ftp.

scp lets you remotely copy a file to or from an SSH server. Generally, people only use scp if they are going to recusively upload a folder or upload just one file. There's also the fact that since scp is a one-liner,

sftp is an interactive program that let's you upload files to/from an SSH server. The advantage of using sftp over scp is that if you need to do multiple uploads from or to different directories, you can do it in one session.


Here's a bit of information on the subject.