How to Use Secure Copy (SCP) to Transfer Files to Your Website
September 10th, 2013 By:Tavis J. Hampton
There are many ways to transfer files to and from a web server. The most common method is FTP (file transfer protocol), but it is not secure and opens up your website to the possibility of being exploited. Among the secure alternatives is a method called SCP, which stands for Secure Copy. Using the Secure Shell (SSH) protocol, it allows you to securely transfer files from one host to another host over a local network or the Internet. We will cover two methods of transferring with SCP, one from the command line and the other using a graphical tool.
On a Linux-based or Unix-based computer such as Ubuntu, FreeBSD, or Mac OS X, you should already have the necessary tools to run SCP from the command line. On Windows, you will need to install software such as PuTTY in order to connect to a remote server over SSH.
The formula for copying files with SCP is as follows:
scp localfile username@host:/path/to/destination/directory
This copies a file from your current directory. If you need to copy from another directory, specify the whole path:
scp /path/to/local/file username@host:/path/to/destination/directory
For example, if you want to copy a file called “statistics.txt” from your local machine to a host called myhost.tld, with the username “elmo”, you would type the following:
scp statistics.txt email@example.com:/home/user/bigbird/stats
Every graphical program approaches SCP differently, and most support other transfer methods, such as FTP, SFTP, and even WebDAV.
For Windows, a common SCP tool is WinSCP, which is free to use and open source.
For Mac OS X, you can use Fugu, which is also free and open source.
For Linux, you can use gFTP or also use the SSH-based secure transfer methods supported by your OS, such as KDE’s Dolphin file manager, which has built-in support.
SCP is a good for quick file copying, but it is not as robust as SFTP, which supports additional tasks like remote file management, directory listings, and more. If you want a true alternative to FTP for full file management, go with SFTP instead. Nevertheless, for quick file copying, SCP servers a good purpose.
|Corero Network Security|
* Real-time DDoS protection for you and your customers
* Purpose built DDoS protection appliance deployed at the Internet edge
* On-premises technology is designed to handle volumetric network-based DDoS attacks or floods, reflective and amplified spoof attacks, like DNS and NTP attacks, as well as application layer attacks - such as slow loris, slow read etc
* Unique, slim-line appliance family delivers 10 Gbps full-duplex performance in a 1/4 wide, 1 RU form factor, enabling Hosting providers to deploy a combination of SmartWall TDS appliances to deliver the performance, connectivity and security required
* Providers are now enabled to offer creative new offerings, such as DDoS and cyber threat protection, enhanced security SLAs as well as visibility and reporting through an analytics portal that can be leveraged as a premium service offering