Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

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


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 ‘’ and I have write privileges with the user ‘myuser’ and password ‘mypassword’:

scp mytarball.tgz

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 .

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

Related Hot Questions

Government Jobs Opening