scp | Linux Secure Copy

scp
scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] [-X sftp_option] source ... target

Source

Copy from


Target

to


@ :

Parameters

Examples


      scp -r -i schubu_markus /Users/jaqueline/Documents/artwork markus@184.192.156.91:/home/markus/website/images/icons/
   

Todo

How paths work

šŸ”¹ 1. Local Paths

Unix/Linux/macOS style

Absolute path (starts from the root /)

/etc/www/index.html

Relative path (relative to current directory)

./index.html ../parent/file.txt

Windows style

Absolute path (with drive letter)

C:\Users\Alice\Documents\file.txt

Relative path (relative to current directory)

.\file.txt ..\parent\file.txt

šŸ”¹ 2. Remote Paths

Paths that specify a file/directory on another machine, usually with a protocol.
user@hostname:/path/to/file

Example

bob@192.168.1.5:/var/www/html/index.html

The data you enter

We do not collect any of the data you enter. saved in localStorage for your convenience, when returning to this site.

NAME scp – OpenSSH secure file copy SYNOPSIS scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] [-X sftp_option] source ... target DESCRIPTION scp copies files between hosts on a network. scp uses the SFTP protocol over a ssh(1) connection for data transfer, and uses the same authentication and provides the same security as a login session. scp will ask for passwords or passphrases if they are needed for authentication. The source and target may be specified as a local pathname, a remote host with optional path in the form [user@]host:[path], or a URI in the form scp://[user@]host[:port][/path]. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ā€˜:’ as host specifiers. When copying between two remote hosts, if the URI format is used, a port cannot be specified on the target if the -R option is used. The options are as follows: