From e83dd8709d2cf8dd5d5cb20bb51258b806e1283e Mon Sep 17 00:00:00 2001 From: annoum Date: Thu, 15 Nov 2018 12:09:18 +0000 Subject: [PATCH] added scp.html for intermediate page git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@200 a672b425-5310-4d7a-af5c-997e18724b81 --- site/pages/cmd/interm/scp.html | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 site/pages/cmd/interm/scp.html diff --git a/site/pages/cmd/interm/scp.html b/site/pages/cmd/interm/scp.html new file mode 100644 index 0000000..796e2a9 --- /dev/null +++ b/site/pages/cmd/interm/scp.html @@ -0,0 +1,80 @@ +--- +layout: page +category-title: Intermediate commands +category-page: intermediate +tags: +author: Announ Marwan +title: kill +--- + +

+ +

SCP

+

What is SCP?

+I think that you are familiar with "cp command", so SCP stand for "secure copy". +
You have to know that the only difference between "cp" and "scp" is that you use cp command into your +
local machine and scp if one or both the location are on the remote system. + +
+
+cp /home/SA/course/images.jpg /home/SA/MY
+
+  
+ +As you can see from the example above we use cp, to copy images from folder course into folder "MY" +
+ +Now, we see the same example but using scp command + +
+
+scp /home/SA/course/images.jpg  marwan@myhost.com:/home/SA/MY
+
+
+ +Where marwan it's just an example(my real name..), you have to use you real host. +
This operation require passsword before upload. + +
+scp marwan@myhost.com:/home/SA/My/image1.jpg /home/SA/downloads
+
+
+
+ +As you can see from the above example, with this command you can download image1.jpg from remote +
directory to your local (in this case downloads folder) + + +
+
+scp marwan@myhost.com:/home/user/dir1/sa.txt marwan@myhost.com:/home/SA/course
+
+
+
+ +In this example we move sa.txt from remote directory to another remote directory. + + +

Other example of using scp with options

+ +You have to know that you can use scp command with some options, such as -1, -2 and so on. + +
+

-1 to use scp with protocol 1

+

-2 to use scp with protocol 2

+

-3 to copy between 2 remote passing through local(like example above)

+

-4 to use scp with IPv4 addresses

+

-6 Guess..? to use scp with Ipv6 addresses

+

-C to enable compression of the encrypted connection

+

-c to encrypt data transfer (C and c is not the same options)

+ + + +
+ +

Good, now you are able to copy and move files between remote system

+ + + + +