Transfer files or folders between servers with SCP (Secure Copy)

We are going to quickly transfer some folders (recursive) from server1 to server2 through SCP (Secure Copy). Let us spam the std/out/in a little.

On server1:

scp -2 -P your_custom_ssh_port -r /path/to/target user@server2:/path/to/destination

-2: use protocol 2
-P: use non standard port
-r: recursive

your_custom_ssh_port = I hope you’re not using the standard 22!

Advertisements

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