Linux scp command Help and Examples

April 21, 2019

Comments

Adsense

Adsense

Adsense

Adsense

SCP stands for Secure Copy, as the name shows it use for securely copy the file, directory from one location to another.

SCP use to copy files securely between networks and system/servers. It uses SSH protocol for authentication and data transfer.

SCP command Syntax:

The syntax of SCP command is very simple, which work with source and destination file path. It is similar like below:
$ scp  source_file_path  destination_file_path

As per the requirement, we can use hostname, port, username, and password with SCP command options.

Here some examples of SCP command which will help you to understand the real use of SCP command.

Suggested Reading: Linux sed command Structure

SCP Command Examples:

Copy a file to remote system

To copy a file into the remote server, you can use source and destination path.

$ scp linuxconcept.pdf [email protected]:.

The above command will copy a linuxconcept.pdf file into satish’s home directory at “linuxconcept.com” system.

Get the detailed information while coping

There is an option “-v” to use to get detailed information while copying the file between host. The option “-v” is used to execute SCP command in verbose mode so that it will print debug information into the screen.

$ scp  -v  linuxconcept.pdf  [email protected]:.

Use specific Port with SCP to connect remote host

To use a specific port with SCP command, you can use the “-P” option, as shown below:

$ scp  -P 44444 linuxconcept.pdf [email protected]:.
[email protected]’s password:
linuxconcept.pdf   100%   4567KB  245.3KB/s   00:21
Satish Kumar

Satish Kumar

I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Adsense

Related Posts

The 30 most useful Linux commands

This article will introduce some practical and common Linux or Unix command , which is the Linux system administrators normally use the command . This article is not a complete list, but a brief list of commands that can be useful...

15 Practical examples of tcpdump command

15 Practical examples of tcpdump command

The tcpdump is the most essential and powerful command-line network packet sniffing tool. We use it to analyze network packets, capture or filter TCP/IP packets that transferred and received over the network on a specific network interface. It is available in almost...

15 Useful “df” Commands to Check Disk Space in Linux

15 Useful “df” Commands to Check Disk Space in Linux

There are several Linux tools available on the internet to check disk space utilization; we can use any of them. But, Linux has a best built-in command-line utility called “df”. The “df” is the short form of “disk filesystem”, we can get detailed information on used...

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

8 − 5 =

News & Updates

Join Our Newsletter

Adsense

Adsense

Adsense

Adsense