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

+ + + + +