Linux-Tip News

We are proud to present Linux-Tip Europe. This page is designed to provide the Linux users community (not only in Europe) with news and articles that are of interest to them. It works by allowing members of the community to submit news and articles relating to Linux hardware and software. This same community can then decide what tips should be promoted based on what they consider to be the most important or interesting to the community by voting stories up and down. Stories that receive enough votes are promoted to the Linux-Tip Europe homepage. Bookmark and Share
 
Home arrow Tips and Tricks arrow Linux Tricks arrow Trick: Secure Copy with SCP
Trick: Secure Copy with SCP Print E-mail
Tuesday, 17 August 2004
Some of you may be familiar with ftp (File Transfer Protocol). It is not a good idea to use ftp over the Internet because it is a relatively insecure method of transfering files between computers.
As most of you know, this protocol sends the user's password and data in the clear over the network, which leaves the user information and data susceptible to password sniffing and other network traffic interception.
To transfer files between machines, you need to use scp. scp works very similarly to cp, except that the files you are copying reside on different machines.

To copy a file from a remote computer to the computer you are working at, you type:

scp user@remote-computer:/remote/path/remote-file /local/path/local-file

Or for the whole directory:

scp -r user@remote-computer:/remote/path/remote-directory /local/path/local-directoty

You will then be prompted for the user's password on the remote computer. After you enter it, the file will be copied. For example:

scp This e-mail address is being protected from spam bots, you need JavaScript enabled to view it :/home/molly/Info/info /home/mwaring/facts

To copy a local file onto a remote computer, you type:

scp /local/path/local-file user@remote-computer:/remote/path/remote-file

Or for the whole directory

scp -r /local/path/local-directory
user@remote-computer:/remote/path/remote-directory


For those of you familiar with ftp, this is like 'put local-file remote-file'.

Note: As with cp, you need to have read/execute permissions on the two files. Also, you should only specify one computer name (either the local host or the remote host). This does not work with Windows machines. scp works only between UNIX/Linux machines.
 
< Prev   Next >

Bookmark this article

Virus Info Feed

Alexa Traffic Stats

Sedo - Domains kaufen und verkaufen das Projekt linux-tip.eu steht zum Verkauf Besucherstatistiken von linux-tip.eu etracker® Web-Controlling statt Logfile-Analyse