Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
Secure copy

Secure copy

Overview
Secure Copy or SCP is a means of securely transferring computer file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

s between a local and a remote host
Server (computing)
A server is an application running on a computer that delivers a service. For example, a web server will deliver web pages when requested by a browser . The way a server and a client dialogs is called a protocol...

 or between two remote hosts, using the Secure Shell
Secure Shell
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send...

 (SSH) protocol.

The term SCP can refer to one of two related things, the SCP protocol or the SCP program.

The SCP protocol, which runs on port 22, is similar to the BSD rcp
Rcp (Unix)
rcp stands for the Unix 'remote copy' command. It is a command on the Unix operating systems that is used to remotely copy -- to copy one or more files from one computer system to another...

 protocol, however unlike rcp, data
Data
The term data means groups of information that represent the qualitative or quantitative attributes of a variable or set of variables. Data are typically the results of measurements and can be the basis of graphs, images, or observations of a set of variables...

 is encrypted
Encryption
In cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. The result of the process is encrypted information...

 during transfer, to avoid potential packet sniffer
Packet sniffer
The packet analyzer is computer software or computer hardware that can intercept and log traffic passing over a digital network or part of a network...

s extracting usable information from the data packets.
Discussion
Ask a question about 'Secure copy'
Start a new discussion about 'Secure copy'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
Secure Copy or SCP is a means of securely transferring computer file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

s between a local and a remote host
Server (computing)
A server is an application running on a computer that delivers a service. For example, a web server will deliver web pages when requested by a browser . The way a server and a client dialogs is called a protocol...

 or between two remote hosts, using the Secure Shell
Secure Shell
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send...

 (SSH) protocol.

The term SCP can refer to one of two related things, the SCP protocol or the SCP program.

SCP protocol


The SCP protocol, which runs on port 22, is similar to the BSD rcp
Rcp (Unix)
rcp stands for the Unix 'remote copy' command. It is a command on the Unix operating systems that is used to remotely copy -- to copy one or more files from one computer system to another...

 protocol, however unlike rcp, data
Data
The term data means groups of information that represent the qualitative or quantitative attributes of a variable or set of variables. Data are typically the results of measurements and can be the basis of graphs, images, or observations of a set of variables...

 is encrypted
Encryption
In cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. The result of the process is encrypted information...

 during transfer, to avoid potential packet sniffer
Packet sniffer
The packet analyzer is computer software or computer hardware that can intercept and log traffic passing over a digital network or part of a network...

s extracting usable information from the data packets. The protocol itself does not provide authentication and confidentiality; it relies on the underlying protocol, SSH
Secure Shell
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send...

, to provide these features.

SCP can interactively request any password
Password
A password is a secret word or string of characters that is used for authentication, to prove identity or gain access to a resource . The password must be kept secret from those not allowed access....

s or passphrase
Passphrase
A passphrase is a sequence of words or other text used to control access to a computer system, program or data. A passphrase is similar to a password in usage, but is generally longer for added security. Passphrases are often used to control both access to, and operation of, cryptographic programs...

s required to make a connection to a remote host, unlike rcp which fails in this situation.

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. Thus the download is server-driven, which imposes a security risk when connected to a malicious server.

For most applications, the SCP protocol is superseded by the more comprehensive SFTP
SSH file transfer protocol
In computing, the SSH File Transfer Protocol is a network protocol that provides file transfer and manipulation functionality over any reliable data stream...

 protocol, which is also based on SSH
Secure Shell
Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send...

.

SCP program


The SCP program is a software tool implementing the SCP protocol as a service daemon or client. It is a program to perform secure copying.

Perhaps the most widely used SCP program is the command line scp program, which is provided in most SSH implementations. The scp program is the secure analog of the rcp command. The scp program must be part of all SSH servers that want to provide SCP service, as scp functions as SCP server too.

Some SSH implementations provide the scp2 program, which uses the SFTP
SSH file transfer protocol
In computing, the SSH File Transfer Protocol is a network protocol that provides file transfer and manipulation functionality over any reliable data stream...

 protocol instead of SCP, but provides the very same command line interface as scp. scp is then typically a symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links first appeared in the 4.2BSD release of Berkeley Unix...

 to scp2.

Typically, a syntax of scp program is like the syntax of cp
Cp (Unix)
cp is the command entered in a Unix shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same or a different name....

:

Copying file to host:
scp SourceFile user@host:directory/TargetFile

Copying file from host:
scp user@host:directory/SourceFile TargetFile

As the SCP protocol implements file transfers only, GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 SCP clients are rare, as implementing it requires additional functionality (directory
Directory (file systems)
Folder, directory, catalog, or drawer, in computing, is a virtual container within a digital file system, in which groups of computer files and other folders can be kept and organized....

 listing at least). For example, WinSCP
WinSCP
WinSCP is an open source SFTP and FTP client for Microsoft Windows. Its main function is secure file transfer between a local and a remote computer. Beyond this, WinSCP offers basic file manager and file synchronization functionality...

 defaults to the SFTP protocol. Even when operating in SCP mode, clients like WinSCP are typically not pure SCP clients, as they must use other means to implement the additional functionality (like the ls command). This in turn brings platform-dependency problems. Thus it may not be possible to work with a particular SCP server using a GUI SCP client, even if you are able to work with the same server using a traditional command line client.

More comprehensive tools for managing files over SSH are SFTP
SSH file transfer protocol
In computing, the SSH File Transfer Protocol is a network protocol that provides file transfer and manipulation functionality over any reliable data stream...

 clients.

See also



  • List of file transfer protocols
  • FTP
    File Transfer Protocol
    File Transfer Protocol is a standard network protocol used to exchange and manipulate files over a TCP/IP based network, such as the Internet. FTP is built on a client-server architecture and utilizes separate control and data connections between the client and server applications...

  • FTPS
    FTPS
    FTPS is an extension to the commonly used File Transfer Protocol that adds support for the Transport Layer Security and the Secure Sockets Layer cryptographic protocols....

  • SSH file transfer protocol
    SSH file transfer protocol
    In computing, the SSH File Transfer Protocol is a network protocol that provides file transfer and manipulation functionality over any reliable data stream...

     (SFTP)
  • FISH
  • SSH
    Secure Shell
    Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send...

  • RSH
    Remote Shell
    The remote shell is a command line computer program which can execute shell commands as another user, and on another computer across a computer network.The remote system to which rsh connects runs the rshd daemon...

  • rsync
    Rsync
    rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place...

  • Telnet
    TELNET
    Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional interactive communications facility. Typically, telnet provides access to a command-line interface on a remote host via a virtual terminal connection which consists of an 8-bit byte oriented data...


Mac OS X
Mac OS X
Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems...

  • OpenSSH
    OpenSSH
    OpenSSH is a set of computer programs providing encrypted communication sessions over a computer network using the ssh protocol. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security...

  • Fugu
    Fugu (software)
    Fugu is an SFTP client for Mac OS X developed by the University of Michigan's Research Systems Unix Group . It is a graphical shell for OpenSSH tools that provides a simple interface to all their features....

  • Cyberduck
    Cyberduck
    Cyberduck is an open source FTP and SFTP, WebDAV, Cloud Files and Amazon S3 client for Mac OS X licensed under the GPL. It supports FTP/TLS , using AUTH TLS as well as directory synchronization. The user interacts with the Cocoa application's GUI, including file transfer by drag and drop, and...

  • MacFusion (uses SSHFS
    SSHFS
    SSHFS is a file system client that may be used on operating systems for which an implementation of FUSE is available....

    )