From ac5dcd7026784f873cfcf16ea2db27e68e411796 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 1 Dec 2014 22:12:32 +0800 Subject: [PATCH 1/9] Translating by ZTinoZ --- ...19 10 SCP Commands to Transfer Files or Folders in Linux.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 8a94352768..d30ebf59bf 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,5 +1,4 @@ -Translating by ZTinoZ -10 SCP Commands to Transfer Files/Folders in Linux +Linux中的十条SCP传输命令 ================================================================================ Linux administrator should be familiar with **CLI** environment. Since **GUI** mode in Linux servers is not a common to be installed. **SSH** may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with **SSH** command there is **SCP** command. **SCP** is used to copy file(s) between servers in secure way. From 48f48783210f2c6c0de58ac0c0ad73e4418174eb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 2 Dec 2014 17:53:43 +0800 Subject: [PATCH 2/9] Translating by ZTinoZ --- ... 10 SCP Commands to Transfer Files or Folders in Linux.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index d30ebf59bf..c88e97661c 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,6 +1,7 @@ -Linux中的十条SCP传输命令 +Linux的十条SCP传输命令 ================================================================================ -Linux administrator should be familiar with **CLI** environment. Since **GUI** mode in Linux servers is not a common to be installed. **SSH** may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with **SSH** command there is **SCP** command. **SCP** is used to copy file(s) between servers in secure way. +Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是不安装**GUI**的。**SSH**可能是Linux系统管理员通过远程方式安全管理服务器的最流行协议。Built-in with 在**SSH**命令中内置了一种叫 +**SCP**的命令,用来在服务器之间安全传输文件。 ![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png) From 9756548568a382f36db1cd9991c64bc2a3109881 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 3 Dec 2014 17:55:57 +0800 Subject: [PATCH 3/9] Translating by ZTinoZ --- ...10 SCP Commands to Transfer Files or Folders in Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index c88e97661c..1f24bb757c 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -5,13 +5,13 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 ![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png) -The below command will read as “**copy source_file_name**” into “**destination_folder**” at “**destination_host**” using “**username account**”. +以下命令可以解读为:用“**username account**”“**复制 source file name**”到“**destination host**”上的“**destination folder**”里。 -#### Basic syntax of SCP #### +#### SCP命令的基本语法 #### scp source_file_name username@destination_host:destination_folder -There are much parameters in **SCP** command that you can use. Here are the parameters that may useful on daily basis usage. +**SCP**命令有很多参数供你使用,这里指的是每次都会用到的参数。 ### Provide the detail information of SCP process using -v parameter ### From 70ca70d0cb470f3872ff2d439613a0736792b17c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 4 Dec 2014 17:53:39 +0800 Subject: [PATCH 4/9] Translating by ZTinoZ --- ...mands to Transfer Files or Folders in Linux.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 1f24bb757c..1d2ca00369 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,7 +1,6 @@ Linux的十条SCP传输命令 ================================================================================ -Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是不安装**GUI**的。**SSH**可能是Linux系统管理员通过远程方式安全管理服务器的最流行协议。Built-in with 在**SSH**命令中内置了一种叫 -**SCP**的命令,用来在服务器之间安全传输文件。 +Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是不安装**GUI**的。**SSH**可能是Linux系统管理员通过远程方式安全管理服务器的最流行协议。在**SSH**命令中内置了一种叫**SCP**的命令,用来在服务器之间安全传输文件。 ![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png) @@ -13,13 +12,13 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 **SCP**命令有很多参数供你使用,这里指的是每次都会用到的参数。 -### Provide the detail information of SCP process using -v parameter ### +### 用-v参数来提供SCP进程的详细信息 ### -Basic **SCP** command without parameter will copy the files in background. User will see nothing unless the process is done or some error appears. You can use “**-v**” parameter to print debug information into the screen. It can help you debugging connection, authentication and configuration problems. +不带参数的基本**SCP**命令会在后台复制文件,除非操作完成或者有错误出现,否则用户在界面上是看不到任何提示信息的。你可以用“**-v**”参数来在屏幕上打印出调试信息,这能帮助你调试连接、认证和配置的一些问题。 pungki@mint ~/Documents $ scp -v Label.pdf mrarianto@202.x.x.x:. -#### Sample Output #### +#### 部分输出 #### Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -t . OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 @@ -47,7 +46,7 @@ The “**-p**” parameter will help you on this. An estimated time and the conn pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:. -#### Sample Output #### +#### 部分输出 #### mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 126.6KB/s 00:29 @@ -60,7 +59,7 @@ Take a look of these commands. It is using a single file of **93 Mb**. pungki@mint ~/Documents $ scp -pv messages.log mrarianto@202.x.x.x:. -#### Sample Output #### +#### 部分输出 #### Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t . OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 @@ -88,7 +87,7 @@ Copying file without “**-C**” parameter will result **1661.3** second. Yo ma pungki@mint ~/Documents $ scp -Cpv messages.log mrarianto@202.x.x.x:. -#### Sample Output #### +#### 部分输出 #### Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t . OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012 From 88a89be1346aee4188575b1c9fff28063c5ca8be Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 8 Dec 2014 18:00:37 +0800 Subject: [PATCH 5/9] Translating by ZTinoZ --- ...ands to Transfer Files or Folders in Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 1d2ca00369..96a1948d97 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -4,7 +4,7 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 ![](http://www.tecmint.com/wp-content/uploads/2013/10/SCP-Commands.png) -以下命令可以解读为:用“**username account**”“**复制 source file name**”到“**destination host**”上的“**destination folder**”里。 +以下命令可以解读为:用“**username account**”“**拷贝 source file name**”到“**destination host**”上的“**destination folder**”里。 #### SCP命令的基本语法 #### @@ -14,7 +14,7 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 ### 用-v参数来提供SCP进程的详细信息 ### -不带参数的基本**SCP**命令会在后台复制文件,除非操作完成或者有错误出现,否则用户在界面上是看不到任何提示信息的。你可以用“**-v**”参数来在屏幕上打印出调试信息,这能帮助你调试连接、认证和配置的一些问题。 +不带参数的基本**SCP**命令会在后台拷贝文件,除非操作完成或者有错误出现,否则用户在界面上是看不到任何提示信息的。你可以用“**-v**”参数来在屏幕上打印出调试信息,这能帮助你调试连接、认证和配置的一些问题。 pungki@mint ~/Documents $ scp -v Label.pdf mrarianto@202.x.x.x:. @@ -40,9 +40,9 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 Bytes per second: sent 57766.4, received 46.0 debug1: Exit status 0 -### Provide modification times, access times, and modes from original files ### +### 从源文件获取修改时间、访问时间和模式 ### -The “**-p**” parameter will help you on this. An estimated time and the connection speed will appear on the screen. +“**-p**”参数会帮到把预计的时间和连接速度会显示在屏幕上。 pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:. @@ -51,11 +51,11 @@ The “**-p**” parameter will help you on this. An estimated time and the conn mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 126.6KB/s 00:29 -### Make file transfer faster using -C parameter ### +### 用-C参数来让文件传输更快 ### -One of parameter that can faster your file transfer is “**-C**” parameter. The “**-C**” parameter will compress your files on the go. The unique thing is the compression is only happen in the network. When the file is arrived to the destination server, it will returning into the original size as before the compression happen. +有一个参数能让传输文件更快,就是“**-C**”参数,它的作用是不停压缩所传输的文件。它特别之处在于压缩是在网络中进行,当文件传到目标服务器时,它会变回压缩之前的原始大小。 -Take a look of these commands. It is using a single file of **93 Mb**. +来看看这些命令,我们使用一个**93 Mb**的单一文件来做例子。 pungki@mint ~/Documents $ scp -pv messages.log mrarianto@202.x.x.x:. @@ -83,7 +83,7 @@ Take a look of these commands. It is using a single file of **93 Mb**. Bytes per second: sent 58758.4, received 15.6 debug1: Exit status 0 -Copying file without “**-C**” parameter will result **1661.3** second. Yo may compare the result to the command below which using “**-C**” parameter. +不用“**-C**”参数来拷贝文件,结果用了**1661.3**秒,你可以比较下用了“**-C**”参数之后的结果。 pungki@mint ~/Documents $ scp -Cpv messages.log mrarianto@202.x.x.x:. From 4843057c838360371f90af236009f568b5b0b3a7 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 9 Dec 2014 12:00:26 +0800 Subject: [PATCH 6/9] Translating by ZTinoZ --- ...mmands to Transfer Files or Folders in Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 96a1948d97..0c67bdef57 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,4 +1,4 @@ -Linux的十条SCP传输命令 +n Linux的十条SCP传输命令 ================================================================================ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是不安装**GUI**的。**SSH**可能是Linux系统管理员通过远程方式安全管理服务器的最流行协议。在**SSH**命令中内置了一种叫**SCP**的命令,用来在服务器之间安全传输文件。 @@ -119,22 +119,22 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 debug1: compress outgoing: raw data 97571111, compressed 8806191, factor 0.09 debug1: compress incoming: raw data 7885, compressed 3821, factor 0.48 -As you can see, when you are using compression, transfer process is done in **162.5** second. It is **10** times faster than not using “**-C**” parameter. If you are copying a lot files across the network, “**-C**” parameter would help you to decrease the total time you need. +看到了吧,压缩了文件之后,传输过程在**162.5**秒内就完成了,速度是不用“**-C**”参数的10倍。如果你要通过网络拷贝很多份文件,那么“**-C**”参数能帮你节省掉很多时间。 -The thing that we should notice that compression method will not work on any files. When the source file is already compressed, you will not find any improvement there. Files such as **.zip**, **.rar**, **pictures**, and **.iso** files will not affected by “**-C**” parameter. +有一点我们需要注意,这个压缩的方法不是适用于所有文件。当源文件已经被压缩过了,那就没办法再压缩了。诸如那些像**.zip**,**.rar**,**pictures**和**.iso**的文件,用“**-C**”参数就无效。 -### Select another cipher to encrypt files ### +### 选择其它加密算法来加密文件 ### -By default **SCP** using “**AES-128**” to encrypt files. If you want to change to another cipher to encrypt it, you can use “**-c**” parameter. Take a look of this command. +**SCP**默认是用“**AES-128**”加密算法来加密文件的。如果你想要改用其它加密算法来加密文件,你可以用“**-c**”参数。我们来瞧瞧。 pungki@mint ~/Documents $ scp -c 3des Label.pdf mrarianto@202.x.x.x:. mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 282.5KB/s 00:13 -Above command tell **SCP** to use **3des algorithm** to encrypt file. Please be careful that this parameter using “**-c**” not “**-C**“. +上述命令是告诉**SCP**用**3des algorithm**来加密文件。要注意这个参数是“**-c**”而不是“**-C**“。 -### Limiting bandwidth usage ### +### 限制带宽使用 ### Another parameter that may useful is “**-l**” parameter. The “**-l**” parameter will limit the bandwidth to use. It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process. From 4f9077ac9ee9dd7b7d80bbb646170854d55291ca Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 10 Dec 2014 20:07:20 +0800 Subject: [PATCH 7/9] Translating by ZTinoZ --- ...119 10 SCP Commands to Transfer Files or Folders in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 0c67bdef57..94a082a1f6 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -136,7 +136,7 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 ### 限制带宽使用 ### -Another parameter that may useful is “**-l**” parameter. The “**-l**” parameter will limit the bandwidth to use. It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process. +还有一个很有用的参数是“**-l**”参数,它能限制使用带宽。It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process. pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:. From d98dd820a1e7926e289e643df11cb356adcb01d2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 11 Dec 2014 21:01:27 +0800 Subject: [PATCH 8/9] Translating by ZTinoZ --- ...10 SCP Commands to Transfer Files or Folders in Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index 94a082a1f6..a295c7cc45 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -136,18 +136,18 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 ### 限制带宽使用 ### -还有一个很有用的参数是“**-l**”参数,它能限制使用带宽。It will be useful if you do an automation script to copy a lot of file, but you don’t want the bandwidth is drained by the **SCP** process. +还有一个很有用的参数是“**-l**”参数,它能限制使用带宽。如果你为了拷贝很多文件而去执行了一份自动化脚本又不希望带宽被**SCP**进程耗尽,那这个参数会非常管用。 pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:. mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 50.3KB/s 01:13 -The **400** value behind “**-l**” parameter is mean that we limit the bandwidth for **SCP** process only **50 KB/sec**. One thing to remember that bandwidth is specified in **Kilobits/sec** (**kbps**). It is mean that **8 bits** equal with **1 byte**. +在“**-l**”参数后面的这个**400**值意思是我们给**SCP**进程限制了带宽为**50 KB/秒**。有一点要记住,带宽是以**千比特/秒** (**kbps**)表示的,**8 比特**等于**1 字节**。 While **SCP** counts in **Kilobyte/sec** (**KB/s**). So if you want to limit your bandwidth for **SCP** maximum only **50 KB/s**, you need to set it into **50 x 8 = 400**. -### Specify specific port to use with SCP ### +### 指定端口 ### Usually **SCP** is using port **22** as a default port. But for security reason, you may change the port into another port. For example, we are using port **2249**. Then the command should be like this. From 174a778200dd9ddd22e964ad016096f054fde705 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 15 Dec 2014 20:50:20 +0800 Subject: [PATCH 9/9] Finish the translation by ZTinoZ --- ...s to Transfer Files or Folders in Linux.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) rename {sources => translated}/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md (72%) diff --git a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md b/translated/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md similarity index 72% rename from sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md rename to translated/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md index a295c7cc45..ab84c499d8 100644 --- a/sources/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md +++ b/translated/tech/20141119 10 SCP Commands to Transfer Files or Folders in Linux.md @@ -1,4 +1,4 @@ -n Linux的十条SCP传输命令 +Linux的十条SCP传输命令 ================================================================================ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是不安装**GUI**的。**SSH**可能是Linux系统管理员通过远程方式安全管理服务器的最流行协议。在**SSH**命令中内置了一种叫**SCP**的命令,用来在服务器之间安全传输文件。 @@ -145,22 +145,22 @@ Linux系统管理员应该很熟悉**CLI**环境,因为在Linux服务器中是 在“**-l**”参数后面的这个**400**值意思是我们给**SCP**进程限制了带宽为**50 KB/秒**。有一点要记住,带宽是以**千比特/秒** (**kbps**)表示的,**8 比特**等于**1 字节**。 -While **SCP** counts in **Kilobyte/sec** (**KB/s**). So if you want to limit your bandwidth for **SCP** maximum only **50 KB/s**, you need to set it into **50 x 8 = 400**. +因为**SCP**是用**千字节/秒** (**KB/s**)计算的,所以如果你想要限制**SCP**的最大带宽只有**50 KB/s**,你就需要设置成**50 x 8 = 400**。 ### 指定端口 ### -Usually **SCP** is using port **22** as a default port. But for security reason, you may change the port into another port. For example, we are using port **2249**. Then the command should be like this. +通常**SCP**是把**22**作为默认端口。但是为了安全起见,你可以改成其它端口。比如说,我们想用**2249**端口,命令如下所示。 pungki@mint ~/Documents $ scp -P 2249 Label.pdf mrarianto@202.x.x.x:. mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 262.3KB/s 00:14 -Make sure that it use capital “**P**” not “**p**“, since “**p**” is already used for preserved times and modes. +确认一下写的是大写字母“**P**”而不是“**p**“,因为“**p**”已经被用来保留源文件的修改时间和模式。 -### Copy files inside directory recursively ### +### 递归拷贝文件和文件夹 ### -Sometimes we need to copy directory and all **files** / **directories** inside it. It will be better if we can do it in **1** command. **SCP** support that scenario using “**-r**” parameter. +有时我们需要拷贝文件夹及其内部的所有**文件** / **文件夹**,我们如果能用一条命令解决问题那就更好了。**SCP**用“**-r**”参数就能做到。 pungki@mint ~/Documents $ scp -r documents mrarianto@202.x.x.x:. @@ -168,50 +168,50 @@ Sometimes we need to copy directory and all **files** / **directories** inside i Label.pdf 100% 3672KB 282.5KB/s 00:13 scp.txt 100% 10KB 9.8KB/s 00:00 -When the copy process is done, at the destination server you will found a directory named “**documents**” with all it’s files. The folder “**documents**” is automatically created. +拷贝完成后,你会在目标服务器中找到一个名为“**documents**”的文件夹,其中就是所拷贝的所有文件。“**documents**”是系统自动创建的文件夹。 -### Disable progress meter and warning / diagnostic message ### +### 禁用进度条和警告/诊断信息 ### -If you choose not to see progress meter and warning / diagnostic messages from SCP, you may disable it using “**-q**” parameter. Here’s the example. +如果你不想从SCP中看到进度条和警告/诊断信息,你可以用“**-q**”参数来禁用它们,举例如下。 pungki@mint ~/Documents $ scp -q Label.pdf mrarianto@202.x.x.x:. mrarianto@202.x.x.x's password: pungki@mint ~/Documents $ -As you can see, after the you enter the password, there is no any information about SCP process. After the process is complete, you will be see a prompt again. +正如你所看到的,在你输入密码之后,没有任何关于SCP进度的消息反馈。进度完成后,你也看不到任何提示。 -### Copy files using SCP through Proxy ### +### 用SCP通过代理来拷贝文件 ### -Proxy server is usually used in office environment. Natively, SCP is not proxy configured. When your environment using proxy, you have to “tell” SCP to communicate with the proxy. +代理服务器经常用于办公环境,SCP自然是没有经过代理方面的配置的。当你的环境正在使用代理,那么你就必须要“告诉”SCP与代理关联起来。 -Here’s the scenario. The proxy address is **10.0.96.6** and the proxy port is **8080**. The proxy also implemented user authentication. First, you need to create “**~/.ssh/config**” file. Second you put this command inside it. +场景如下:代理的地址是**10.0.96.6**,端口是8080。该代理还实现了用户认证功能。首先,你需要创建一个“**~/.ssh/config**”文件,其次把以下命令输入进该文件。 ProxyCommand /usr/bin/corkscrew 10.0.96.6 8080 %h %p ~/.ssh/proxyauth -Then you need to create file “**~/.ssh/proxyauth**” which contain. +接着你需要创建一个同样包括以下命令的“**~/.ssh/proxyauth**”文件。 myusername:mypassword -After that you can do SCP transparently as usual. +然后你就可以像往常一样使用SCP了。 -Please notice that corkscrew is might not installed yet on your system. On my Linux Mint, I need to install it first, using standard Linux Mint installation procedure. +请注意corkscrew可能还没有安装在你的系统中。在我的Linux Mint中,我需要首先先用标准Linux Mint安装程序来安装它。 $ apt-get install corkscrew -For other yum based systems, users can install corkscrew using the following yum command. +对于其它的一些基于yum安装的系统,用户能用以下的命令来安装corkscrew。 # yum install corkscrew -Another thing that since “**~/.ssh/proxyauth**” file contain your “**username**” and “**password**” in clear-text format, please make sure that the file can be accessed by you only. +还有一点就是因为“**~/.ssh/proxyauth**”文件中以明文的格式包含了你的“**用户名**”和“**密码**”,所以请确保该文件只能你来查看。 -### Select different ssh_config file ### +### 选择不同的ssh_config文件 ### -For mobile user who often switch between company network and public network, it will be suffer to always change settings in SCP. It is better if we can put a different **ssh_config** file to match our needs. +对于经常在公司网络和公共网络之间切换的移动用户来说,一直改变SCP的设置显然是很痛苦的。如果我们能放一个不同的**ssh_config**文件来匹配我们的需求那就很好了。 -#### Here’s a sample scenario #### +#### 以下是一个简单的场景 #### -Proxy is used in company network but not in public network and you are regularly switch network. +代理是被用来在公司网络但不是公共网络并且你会定期切换网络时候使用的。 pungki@mint ~/Documents $ scp -F /home/pungki/proxy_ssh_config Label.pdf @@ -219,18 +219,18 @@ Proxy is used in company network but not in public network and you are regularly mrarianto@202.x.x.x's password: Label.pdf 100% 3672KB 282.5KB/s 00:13 -By default “**ssh_config**” file per user will be placed in “**~/.ssh/config**“. Creating a specific “**ssh_config**” file with proxy compatible, will make you easier to switch between networks. +默认情况下每个用户会把“**ssh_config**”文件放在“**~/.ssh/config**“路径下。用兼容的代理创建一个特定的“**ssh_config**”文件,能让你切换网络时更加方便容易。 -When you are on company network, you can use “**-F**” parameter. When you are on public network, you can skip “**-F**” parameter. +当你处于公司网络时,你可以用“**-F**”参数,当你处于公共网络时,你可以忽略掉“**-F**”参数。 -That’s all about **SCP**. You can see **man pages** of **SCP** for more detail. Please feel free to leave comments and suggestions. +以上就是关于**SCP**的全部内容了,你可以查看**SCP**的**man页面**来获取更多内容,请随意留下您的评论及建议。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/scp-commands-examples/ 作者:[Pungki Arianto][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出