Friday 18, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Monday, 10 July 2017

SCP Securely copy files between hosts on a network Linux Command

scp


scp [options] file1[...] file2

Description

Securely copy files between hosts on a network, using ssh. Part of the OpenSSH suite of network tools. scp requests a password or passphrase if required. The transfer can be between two remote hosts. If more than one file is specified for file1, file2 should be a directory; otherwise, only the last file in the list is copied. file1 and file2 can be specified in any of the following ways:

file host:file user@host:file

The first format is used for a local file; a remote file can be specified in either of the other two formats.

Options


-1
Force the use of SSH protocol 1.

-2
Force the use of SSH protocol 2

-4
Use IPv4 addresses.

-6
Use IPv6 addresses.

-B
Run in batch mode. Don't ask for passwords or passphrases.

-c cipher
Specify the cipher to be used for encrypting the data.

-C
Enable ssh compression.

-F config
Specify an ssh user configuration file (default is $HOME/.ssh/config).

-i file
Specify the file that contains the identity (private key) for RSA authentication.

-l limit
Limit bandwidth used to limit, specified in kilobits/second.

-o option
Specify an option to pass to ssh.

-p
Preserve modification time, access time, and mode.

-P port
Connect to port on the remote host.

-q
Don't display the progress meter.

-r
Copy directories recursively.

-S program
Specify the program to use for the encrypted connection. The program must understand ssh options.

-v
Verbose mode.


Example


Copy the local file user.server1.pub to the remote system server2, putting it in james's home directory:

$ scp user.server1.pub james@server2:/home/james/

Reference : http://www.linuxdevcenter.com

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • tftp Linux Command tftp tftp [options] [host [port] ] [-c command] User interface to TFTP (IPv4 Trivial File Transfer Protocol), which allows users to transfer files to and from a remote machine. The remote host may be specified, and optiona… Read More
  • poweroff - Linux Command poweroff poweroff [options] System administration command. Close out filesystems, shut down the system, and power off. Because this command immediately stops all processes, it should be run only in single-user mode. If the… Read More
  • ftp Linux Command ftp ftp [options] [hostname] Transfer files to and from remote network site hostname. ftp prompts the user for a command. The commands are listed after the options. Some of the commands are toggles, meaning they turn on a … Read More
  • ftpd Linux Command ftpd in.ftpd [options] TCP/IP command. Internet File Transfer Protocol server. The server uses the TCP protocol and listens at the port specified in the ftp service specification. ftpd is usually started by xinetd and must… Read More
  • tftpd Linux Command tftpd in.tftpd [options] [directories] TCP/IP command. IPv4 Trivial File Transfer Protocol server. in.tftpd is normally started by inetd and operates at the port indicated in the tftp Internet service description in /etc/s… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: SCP Securely copy files between hosts on a network Linux Command Rating: 5 Reviewed By: eHowToNow