Tag Archives: SCP

Using SCP instead of FTP

scp

I tried to delete a folder that contained tons of localization folders and waited for a very long time, since I was using FTP client and it was very slow during deleting and copying folders with massive amount of subfolders and files. That is why I decided to find another way to delete and copy files faster to the remote server from my local computer.

Secure copy or SCP is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol.

SCP is more secure that plain FTP. It also allows to copy directly to the given folder on server, if permissions granted. FTP allows to copy only to the FTP folder.

AP_scp

These are the commands.

To copy files from server to your local machine:

To copy files from your local machine to the server:

To go to the folder with a folder, that will be copied (in my case it is common-app-server folder):

To archive a folder, so that not to include Mac OS X system files like .DS_Store

To remove a folder from server before copying a new version:

To copy zip file using SCP:

Here root is a user name, that has permission to write to the destination folder.
lovecakes.ru – server name
/var/www/den.ladby.ru/public – destination folder

To install zip on server:

To unzip copied folder on server:

To remove MACOSX folder:

To remove zip file on server and local machine after unzipping:

To copy a folder without archiving: