Solved

Are sftp and scp essentially the same thing?

Posted on 2009-07-16
6
937 Views
Last Modified: 2012-05-07
I have been using scp for secure copying of files between Linux hosts. I now have need to transmit to a host using sftp. Are these (scp/sftp) essentially the same thing? Do they use different daemon servers on the remote end?
0
Comment
Question by:jmarkfoley
6 Comments
 
LVL 12

Assisted Solution

by:Let_Me_Be
Let_Me_Be earned 150 total points
ID: 24870441
The difference between scp and sftp is the same as between cp and ftp. And yes they use the same daemon (usually).
0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24870589
To clarify what I think Let_Me_Be means is they both work over SSH (the same protocol). One gives a command line prompt interface (sftp) and one works in a promptless mode (scp here there)

0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 24870724
but, an scp client would not talk to a sftp daemon, right? So if my target hosts wants sftp, I have to use the sftp client ... right?
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24870797
It is the same daemon: sshd.
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 150 total points
ID: 24870854
All work over port 22, by default
0
 
LVL 48

Accepted Solution

by:
Tintin earned 200 total points
ID: 24873773
scp and sftp both achieve the same thing but do it in quite different ways.  

The SCP protocol implements file transfers only. It does so by connecting to the host using SSH and there executes an SCP server (scp). The SCP server program is typically the same program as the SCP client.

For upload, the client feeds the server with files to be uploaded, optionally including their basic attributes (permissions, timestamps). This is an advantage over the common FTP protocol, which does not have provision for uploads to include the original date/timestamp attribute.

For downloads, the client sends a request for files or directories to be downloaded. When downloading a directory, the server feeds the client with its subdirectories and files.


Compared to the earlier SCP protocol, which allows only file transfers, the SFTP protocol allows for a range of operations on remote files  it is more like a remote file system protocol. An SFTP client's extra capabilities compared to an SCP client include resuming interrupted transfers, directory listings, and remote file removal. [1] For these reasons it is relatively simple to implement a GUI SFTP client compared with a GUI SCP client.

SFTP attempts to be more platform-independent than SCP; for instance, with SCP, the expansion of wildcards specified by the client is up to the server, whereas SFTP's design avoids this problem. While SCP is most frequently implemented on Unix platforms, SFTP servers are commonly available on most platforms.

SFTP is not FTP run over SSH, but rather a new protocol designed from the ground up by the IETF SECSH working group. It is sometimes confused with Simple File Transfer Protocol. [1]

The protocol itself does not provide authentication and security; it expects the underlying protocol to secure this. SFTP is most often used as subsystem of SSH protocol version 2 implementations, having been designed by the same working group. However, it is possible to run it over SSH-1 (and some implementations support this) or other data streams. Running SFTP server over SSH-1 is not platform independent as SSH-1 does not support the concept of subsystems. An SFTP client willing to connect to an SSH-1 server needs to know the path to the SFTP server binary on the server side.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question