linux scp命令用法

Scp is an acronym for Secure Copy. It is used primarily for copying files over an ssh connection. The copied files are encrypted and assumed secure as ssh. If the files contain sensitive data copying them with SCP or similar encrypted protocol is the best solution. In this tutorial, we will look at how to use SCP in a detailed manner.

Scp是安全复制的缩写。 它主要用于通过ssh连接复制文件。 复制的文件已加密,并假定安全为ssh。 如果文件包含敏感数据,则最好使用SCP或类似的加密协议进行复制。 在本教程中,我们将详细研究如何使用SCP。

使用ssh软件包安装scp命令 (Install scp Command with ssh Package)

Scp is provided by ssh packages in Linux distributions. So to install scp we will install ssh but ssh is generally installed by default.

Scp由Linux发行版中的ssh软件包提供。 因此,要安装scp我们将安装ssh,但默认情况下通常会安装ssh。

Ubuntu,Debian,Mint,Kali (Ubuntu, Debian, Mint, Kali)

scp is provided with the ssh package. We will install the ssh package with the following apt install command.

ssh软件包提供了scp 。 我们将使用以下apt install命令安装ssh软件包。

$ sudo apt install ssh -y

Ubuntu, Debian, Mint, Kali
Ubuntu,Debian,Mint,Kali

Fedora,CentOS,RHEL (Fedora,CentOS, RHEL)

We will use dnf or yum package manager.

我们将使用dnfyum软件包管理器。

$ sudo dnf install ssh -y

OR

要么

$ sudo yum install ssh -y

Scp命令语法 (Scp Command Syntax)

To get a simple and fast help run SCP without any parameter like below. As we can see we use scp command and provide options related to the connection. Then we will provide a username and remote hostname with @ delimiter.

要获得简单快速的帮助,请运行不带以下任何参数的SCP。 如我们所见,我们使用scp命令并提供与连接有关的选项。 然后,我们将使用@分隔符提供用户名和远程主机名。

scp OPTIONS[email protected]_HOST:/FILES_DIRECTORIES [email protected]_HOST:/FILES_DIRECTORIES
  • OPTIONS will define the behavior of the scp command like cipher type, recursive, speed, ssh port, and limit.

    选项将定义scp命令的行为,例如密码类型,递归,速度,ssh端口和限制。

  • USERNAME is the user of the remote systemUSERNAME是远程系统的用户
  • SOURCE_HOST is the host we want to copy files and folders which will be the source.SOURCE_HOST是我们要复制将作为源的文件和文件夹的主机。
  • DESTINATION_HOST is the destination host where source files and directories will be copied.DESTINATION_HOST是将在其中复制源文件和目录的目标主机。
  • FILES_DIRECTORIES are copied files and directories remote system paths and names.FILES_DIRECTORIES是复制的文件和目录,以及远程系统的路径和名称。

Scp命令帮助信息 (Scp Command Help Information)

To get more detailed help man scp command can be used like below. Scp Unix usage is not different from Linux Scp usage.

要获得更详细的帮助,可以像下面这样使用man scp命令。 Scp Unix使用与Linux Scp使用没有什么不同。

$ man scp

Scp Command Help Information
Scp命令帮助信息

使用Scp将远程文件复制到本地系统(Copy Remote Files To Local System With Scp)

We will copy files with scp command like below. While copying files scp will ask for credentials.

我们将使用scp命令复制文件,如下所示。 在复制文件时,scp将要求提供凭据。

$ scp[email protected]:/home/ismail/Downloads/backup.tar.gz /home/ali

We have copied backup.tar.gz by providing ismail user from local system to the /home/ali. It is not asked for a password because I have already copied the required credentials.

我们通过将ismail用户从本地系统提供到/home/ali复制了backup.tar.gz。 不需要输入密码,因为我已经复制了所需的凭据。

.u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .postImageUrl , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text-area { min-height: 80px; position: relative; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:visited , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:active { border:0!important; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .clearfix:after { content: ""; display: table; clear: both; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:active , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text-area { width: 100%; position: relative; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover .ctaButton { background-color: #E67E22!important; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:after { content: ""; display: block; clear: both; }

LEARN MORE  Expect Scripting Tutorial With Examples

.u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .postImageUrl , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text-area { min-height: 80px; position: relative; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:visited , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:active { border:0!important; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .clearfix:after { content: ""; display: table; clear: both; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:active , .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text-area { width: 100%; position: relative; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:hover .ctaButton { background-color: #E67E22!important; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9 .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u09ee4b1c6de1e8e4b1dfceb3cb4e6be9:after { content: ""; display: block; clear: both; }

了解更多信息期望脚本教程与示例

使用证书身份验证运行不带密码的Scp命令(Run Scp Command without Password with Certificate Authentication)

If we want to use scp in a passwordless and more secure manner, we need to setup SSH Key-based authentication. In order to set up key-based authentication, we need to have keys that can be created with the ssh-keygen command like below.

如果要以无密码且更安全的方式使用scp ,则需要设置基于SSH密钥的身份验证。 为了设置基于密钥的身份验证,我们需要具有可以使用ssh-keygen命令创建的密钥,如下所示。

$ ssh-keygen

Passwordless scp Command
无密码的scp命令

After creating a key pair we will deploy the public key with the following command to the remote system by providing the user. It will ask a password for the user. After deployment, we can use ssh without a password.

创建密钥对之后,我们将通过提供用户,将带有以下命令的公钥部署到远程系统。 它将询问用户密码。 部署后,我们可以使用不带密码的ssh。

$ ssh-copy-id[email protected]

使用Scp将本地文件复制到远程 (Copy Local File To The Remote With Scp)

We will copy the local file to the remote. As you will see there is no difference from copying from remote to local.

我们将本地文件复制到远程文件。 如您所见,从远程复制到本地没有什么区别。

$ scp backup.tar.gz[email protected]:/home/ismail/Downloads
  • backup.tar.gz is the local file name we want to copy to the remote.

    backup.tar.gz是我们要复制到远程的本地文件名。

  • ismail is the username we will authenticate on the remote server.

    ismail是我们将在远程服务器上进行身份验证的用户名。

  • 192.168.122.233 is the IP address of the remote system.

    192.168.122.233是远程系统的IP地址。

  • /home/ismail/Downlaods is the remote system path we want to copy.

    /home/ismail/Downlaods是我们要复制的远程系统路径。

使用Scp将远程文件复制到本地 (Copy Remote File To The Local With Scp)

Alternatively, we can copy remote files and directories to the local system. We will specify the remote system as a source host. While specifying source host we may need to provide a user name explicitly. Then we will specify the destination which will be our local system path. In this example, we will copy the file named test.tar.gz file into the local system path /home/ismail. We will use ali as a remote system user name.

或者,我们可以将远程文件和目录复制到本地系统。 我们将远程系统指定为源主机。 在指定源主机时,我们可能需要显式提供用户名。 然后,我们将指定目标位置,这将是我们的本地系统路径。 在此示例中,我们将名为test.tar.gz文件复制到本地系统路径/home/ismail 。 我们将使用ali作为远程系统用户名。

$ scp[email protected]:/mnt/test.tar.gz /home/ismail/

使用Scp递归复制文件夹 (Copy Folders Recursively With Scp)

Up to now, we have copied single files from remote. To copy folders with its sub-folders can be done with a recursive parameter. Recursive parameter makes to copy entire directories recursively. We will use the -r option.

到目前为止,我们已经从远程复制了单个文件。 要复制带有子文件夹的文件夹,可以使用递归参数。 递归参数使您可以递归复制整个目录。 我们将使用-r选项。

$ scp -r Downloads 192.168.122.233:/home/ismail/Documents

将多个本地文件复制到远程系统 (Copy Multiple Local Files To The Remote System)

We can copy multiple local files to the remote system with SCP command. We will just provide the names of the local files for the source and in the last, we will provide the destination or remote system we want to copy. In this example, we will copy local files named file1.txt, file2.txt and file3.tar.gz to the remote system.

我们可以使用SCP命令将多个本地文件复制到远程系统。 我们将仅提供源的本地文件名,最后,我们将提供要复制的目标或远程系统。 在此示例中,我们将名为file1.txtfile2.txtfile3.tar.gz本地文件复制到远程系统。

$ scp file1.txt file2.txt file3.tar.gz[email protected]:/home/ismail/

复制特定文件类型或扩展名的所有文件 (Copy All Files For Specific File Type or Extension)

In some cases, we may need to copy only specific file types or extensions. We can use the bash glob operator in order to generalize the file name and set the extension. In this example, we will copy all text files with the *.txt extension into the remote system.

在某些情况下,我们可能只需要复制特定的文件类型或扩展名。 我们可以使用bash glob运算符来概括文件名并设置扩展名。 在此示例中,我们将所有带有*.txt扩展名的文本文件复制到远程系统中。

$ scp /home/ismail/*.txt[email protected]:/home/ismail

使用Scp复制时压缩文件 (Compress Files While Copying With Scp)

Scp encrypts files while copying and this makes some performance loss for the transmission. We can eliminate this performance loss by compressing files. Keep in mind that files are compressed for transfer not entirely. We will use -C option for compression.

Scp在复制时会加密文件,这会导致传输性能下降。 我们可以通过压缩文件来消除这种性能损失。 请记住,文件不完全压缩以进行传输。 我们将使用-C选项进行压缩。

$ scp -C original-ks.cfg[email protected]:/root/original-ks.cfg

By providing -C parameter we have enabled compression for the transfer.

通过提供-C参数,我们启用了传输压缩。

对Scp使用不同的SSH端口 (Use Different SSH Port For Scp)

Ssh runs by default tcp/22 but sometimes it may be different from that. Scp assumes the port of ssh 22 too. We can change port like below. We will provide the port name with the -P option and the port number.

SSH默认运行tcp / 22,但有时可能与此不同。 Scp也假定为ssh 22的端口。 我们可以像下面那样更改端口。 我们将为端口名提供-P选项和端口号。

$ scp -P 2222 original-ks.cfg[email protected]:/root/original-ks.cfg

We have provided port number with -P parameter and the value </b>2222.

我们提供了带有-P参数和值</b>2222端口号

设置Scp文件传输的带宽限制 (Set Bandwidth Limit For Scp File Transfer)

If our network capacity or bandwidth is limited or there is some heavy load which is important copying files with Scp will create extra load. We may need to limit the bandwidth usage of the Scp command. We can use the -l option and provide the bandwidth we want to set for Scp command. In this example, we will set the bandwidth usage to the 100 kbps.

如果我们的网络容量或带宽有限,或者负载过重,那么使用Scp复制文件将产生额外的负载,这一点很重要。 我们可能需要限制Scp命令的带宽使用。 我们可以使用-l选项,并提供我们要为Scp命令设置的带宽。 在此示例中,我们将带宽使用率设置为100 kbps。

$ scp -l 100 Backup.tar.gz  192.168.122.233:/home/ismail/Documents

Scp的详细或调试模式 (Verbose or Debug Mode For Scp)

If there is a problem with the Scp file transfer or connection we have to troubleshoot the problem. So we need more information about the Scp where verbose or debug mode can be enabled with the -v.

如果Scp文件传输或连接有问题,我们必须解决该问题。 因此,我们需要有关Scp的更多信息,其中可以使用-v启用详细或调试模式。

$ scp -r -v kafka_2.12-2.2.0[email protected]:/home/ismail/backup/

Verbose and Debug Mode For Scp
Scp的详细和调试模式

将密码传递给Scp命令(Passing Password To Scp Command)

We have already set up passwordless key-based authentication but we may need to use SCP with the password. In this case, we can provide a password with a simple app named sshpass to the SCP like below.

我们已经设置了无密码的基于密钥的身份验证,但是我们可能需要将SCP与密码一起使用。 在这种情况下,我们可以使用一个名为sshpass的简单应用程序向SCP提供密码,如下所示。

$ dnf install sshpass

We have installed it. Because it is separate from ssh tools.

我们已经安装好了。 因为它与ssh工具分开。

$ sshpass -p "123456" scp original-ks.cfg[email protected]:/root/original-ks.cfg

Here -p for the password and “123456” is our password. Note that our password is not strong and it is easily hackable. Then we provide regular scp command.

在此, -p为密码, “ 123456”为我们的密码。 请注意,我们的密码不强,很容易被黑客入侵。 然后我们提供常规的scp命令。

.uea1263f373f9841c70471a03ffcaac31 , .uea1263f373f9841c70471a03ffcaac31 .postImageUrl , .uea1263f373f9841c70471a03ffcaac31 .centered-text-area { min-height: 80px; position: relative; } .uea1263f373f9841c70471a03ffcaac31 , .uea1263f373f9841c70471a03ffcaac31:hover , .uea1263f373f9841c70471a03ffcaac31:visited , .uea1263f373f9841c70471a03ffcaac31:active { border:0!important; } .uea1263f373f9841c70471a03ffcaac31 .clearfix:after { content: ""; display: table; clear: both; } .uea1263f373f9841c70471a03ffcaac31 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .uea1263f373f9841c70471a03ffcaac31:active , .uea1263f373f9841c70471a03ffcaac31:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .uea1263f373f9841c70471a03ffcaac31 .centered-text-area { width: 100%; position: relative; } .uea1263f373f9841c70471a03ffcaac31 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .uea1263f373f9841c70471a03ffcaac31 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .uea1263f373f9841c70471a03ffcaac31 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .uea1263f373f9841c70471a03ffcaac31:hover .ctaButton { background-color: #E67E22!important; } .uea1263f373f9841c70471a03ffcaac31 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .uea1263f373f9841c70471a03ffcaac31 .uea1263f373f9841c70471a03ffcaac31-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .uea1263f373f9841c70471a03ffcaac31:after { content: ""; display: block; clear: both; }

LEARN MORE  TCP and UDP Port List, Names and Usage Frequency

.uea1263f373f9841c70471a03ffcaac31 , .uea1263f373f9841c70471a03ffcaac31 .postImageUrl , .uea1263f373f9841c70471a03ffcaac31 .centered-text-area { min-height: 80px; position: relative; } .uea1263f373f9841c70471a03ffcaac31 , .uea1263f373f9841c70471a03ffcaac31:hover , .uea1263f373f9841c70471a03ffcaac31:visited , .uea1263f373f9841c70471a03ffcaac31:active { border:0!important; } .uea1263f373f9841c70471a03ffcaac31 .clearfix:after { content: ""; display: table; clear: both; } .uea1263f373f9841c70471a03ffcaac31 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .uea1263f373f9841c70471a03ffcaac31:active , .uea1263f373f9841c70471a03ffcaac31:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .uea1263f373f9841c70471a03ffcaac31 .centered-text-area { width: 100%; position: relative; } .uea1263f373f9841c70471a03ffcaac31 .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .uea1263f373f9841c70471a03ffcaac31 .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .uea1263f373f9841c70471a03ffcaac31 .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .uea1263f373f9841c70471a03ffcaac31:hover .ctaButton { background-color: #E67E22!important; } .uea1263f373f9841c70471a03ffcaac31 .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .uea1263f373f9841c70471a03ffcaac31 .uea1263f373f9841c70471a03ffcaac31-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .uea1263f373f9841c70471a03ffcaac31:after { content: ""; display: block; clear: both; }

了解更多TCP和UDP端口列表,名称和使用频率

如何使用Scp逃逸路径中的空间(How to Escape Spaces In The Path With Scp)

If there are spaces in the local or remote path it may become a problem. Say we have a folder named  “test 1”. There are two solutions for this

如果本地或远程路径中有空格,则可能会成为问题。 假设我们有一个名为“ test 1”的文件夹。 有两种解决方案

$ scp  original-ks.cfg[email protected]:/root/Downloads/test\\\ 1/

We have simple add \\\ before space in the folder name.

我们在文件夹名称中的空格前简单添加了\\\

$ scp  original-ks.cfg[email protected]:"'/root/Downloads/test 1/'"

We have added a single and double quote around path like above.

我们在上述路径周围添加了单引号和双引号。

SCP表现 (SCP Performance)

As we know SCP uses some encryption algorithms. Scp by default uses Triple-DES to encrypt network traffic. Triple-DES can cause some performance bottlenecks so faster Blowfish or aes128-ctr encryption algorithm usage will make transfers faster.

众所周知,SCP使用了一些加密算法。 默认情况下,Scp使用Triple-DES加密网络流量。 三重DES可能会导致一些性能瓶颈,因此更快的Blowfish或aes128-ctr加密算法使用将使传输速度更快。

$ scp -c aes128-ctr tmux.tar ubu1:/home/ismail/backup/

Linux SCP Command Usage With Examples Infografic
Linux SCP命令用法与示例示例

翻译自: https://www.poftut.com/linux-scp-command-usage-with-examples/

linux scp命令用法

linux scp命令用法_Linux SCP命令用法示例相关推荐

  1. ignite windows无法访问linux ignite集群_Linux常见命令

    一 Linux常见命令介绍 1.Linux系统目录 (1)/ 根目录.Unix 和 Linux 中,没有盘符. 一个硬盘,一个根. (2) /bin 系统的常用命令目录. 包括控制台命令, 系统可执行 ...

  2. linux tar命令压缩_Linux tar命令来压缩和提取文件

    linux tar命令压缩 In this guide, we look at the Linux Tar command, Tar, short for Tape Archive, is a com ...

  3. atop用法_Linux atop 命令 command not found atop 命令详解 atop 命令未找到 atop 命令安装 - CommandNotFound ⚡️ 坑否...

    显示行号 | 选择喜欢的代码风格 默认 GitHub Dune LakeSide Plateau Vibrant Blue Eighties Tranquil atop 命令监控 Linux 系统资源 ...

  4. linux 运行ctl文件_linux journalctl 命令

    目录 journalctl 用来查询 systemd-journald 服务收集到的日志.systemd-journald 服务是 systemd init 系统提供的收集系统日志的服务. 命令格式为 ...

  5. linux ls没有反应_Linux入门②“命令格式”

    Linux终端敲命令是一件"爽"的事情. 对于我这样的新手来说,这个过程是我一直坚持下去的动力,每次敲下一行命令,终端就会对你作出反馈,而且这个反馈掷地有声,反应非常的迅速,说不出 ...

  6. linux wget返回值_Linux中wget用法

    Wget简介: Linux系统中wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,我们经常要下载一些软件或从远程服务器恢复备份到本地服务器.wget支持HTTP,HTT ...

  7. linux中mtools工具_Linux mtools命令

    Linux mtools命令 Linux mtools命令用于显示mtools支持的指令. mtools为MS-DOS文件系统的工具程序,可模拟许多MS-DOS的指令.这些指令都是mtools的符号连 ...

  8. linux解压mysql文件命令行_linux mysql命令

    1.linux下启动mysql的命令: mysqladmin start /ect/init.d/mysql start (前面为mysql的安装路径) 2.linux下重启mysql的命令: mys ...

  9. linux中mtools工具_Linux mtools命令 - Linux 教程 - 自强学堂

    Linux mtools命令用于显示mtools支持的指令. mtools为MS-DOS文件系统的工具程序,可模拟许多MS-DOS的指令.这些指令都是mtools的符号连接,因此会有一些共同的特性. ...

最新文章

  1. python的设计模式之MVC模式
  2. python脚本监控网站状态 - 赵海华_运维之路 - 51CTO技术博客
  3. Leetcode 322. 零钱兑换 (每日一题 20210824)
  4. Gartner:2019年七大AI科技趋势,百万行业将颠覆!
  5. http/https监控获取响应时间(DNS解析时间,RRT时间,服务器处理时间等)
  6. sublime老版本历史版本的linux包下载地址
  7. 前端学习(3223):总结props
  8. [转载] 菜鸟举例理解字节流和字符流区别
  9. 不懂这37个数据中心术语,怎么混数据圈饭局!
  10. c语言做一个小程序报告,《C语言程序设计实践》课程报告30个小程序组合成一个大程序.doc...
  11. cupsd进程_关于Linux操作系统进程操作(ps)命令简介
  12. 性能测试之JMeter中ForEach控制器详解
  13. mysql盲注ascii_[翻译]关于通过对8bit的ascii做右位移提高mysql盲注效率
  14. 【转载】Linux下rz,sz与ssh的配合使用
  15. a4如何打印双面小册子_小册子打印
  16. mate10 android系统,华为Mate10官方固件rom刷机包_华为Mate10完整系统升级包
  17. 数据库实验一:创建数据库和表
  18. CRMEB多商户1.7.1版本功能更新预告 预计12月更新
  19. Ubuntu 编译最新LLVM套件:LLVM 16.0
  20. cairo填充_cairo graphics 手册(2)

热门文章

  1. Mysql数据库备份的问题:mysqldump: Got error: 1049: Unknown database 'blog;' when selecting the database
  2. 旋翼无人机飞控的软件设计
  3. 前端面试:浅拷贝和深拷贝的区别?
  4. SpatialHadoop中空间索引系列之(三)格网索引原理
  5. 克罗格 Kroger EDI需求分析及注意事项
  6. iOS 逆向编程(四)实操越狱进阶必备软件
  7. 普中HC6800V2.2开发板思考记录-继电器概念、原理、使用方法
  8. VISP库IBVS仿真
  9. RabbitMQ的MTQQ插件实现即时通讯
  10. iframe刷新-前端跨域