Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


Question:how to use scp unix command on command line?


scp

Scp is useful in conjunction with tar. It allows you to securely copy a file from one server to another. To do this you must know the address of your destination server and you must have a username and password for a user with write privileges in the location you want to put the file. For this example, say I want to move that tarball I created earlier to a server ‘someserver.com’ and I have write privileges with the user ‘myuser’ and password ‘mypassword’:


scp mytarball.tgz myuser@someserver.com:/home/myuser

You would then be prompted for the password of ‘myuser’. This would copy the file to the directory /home/myuser on the host server. If you were on the host server already and wanted to copy a file from a remote server you would do:


scp anotheruser@someotherserver.com:/home/anotheruser/filetocopy.txt .

You would then be prompted for that users password. This would copy the file ‘filetocopy.txt’ from a remote server to your current director. This is essentially ‘getting’ a file whereas the first example was ‘putting’ a file.


asked Sep 13, 2013 in LINUX by anonymous
edited Sep 12, 2013
0 votes
36 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...