Solved

Are sftp and scp essentially the same thing?

Posted on 2009-07-16
6
933 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now