Secure copy files between hosts

Description:

Use scp (secure copy) to copy data between different servers, from local or remote hosts.

Solution:

Syntax for secure copying is easy, you just need to provide the source and destination of the file/folder.

Depending where you are copying to and from, you might need to specify the host name.

Copy from remote server to local is like this:

$ scp username@host:foobar.txt local/directory

$ scp root@192.123.123.111:/root/htdocs/file.txt /myfolder/projects/www

Same with remote-to-remote or local to remote.

Advertisements

About admin

Just another php developer trying to give something back to the community.
This entry was posted in Linux, Tools and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s