LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2017, 04:26 AM   #1
daica85
LQ Newbie
 
Registered: Jul 2017
Location: US
Posts: 2

Rep: Reputation: Disabled
Copy files between 2 servers using SCP command.


Hi friend,

I'm trying to copy my files from previous server to my new server in SSH, using SCP command below (in draft)

scp -P 22 -r root@IP:/home/folder/public_html /home/folder/

But I don't know which is the destination and source?. And which server I need to login first to give that command?

Thanks in advance!
 
Old 07-25-2017, 05:11 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,185

Rep: Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377Reputation: 1377
The format of the scp command is well documented, it's the server/path FROM and the server/path TO

So in your example you're trying to copy from a remote machine specified by IP to the /home/folder/ of the localhost.

So what server do you need to login to first? Whichever one you want as long as you correctly supply the source and destination.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SCP Copy files JJJCR Linux - Server 8 12-12-2013 01:51 AM
Using scp to copy files between servers. muskiediver Linux - General 1 07-11-2006 03:52 PM
copy files....using scp help me suguname Mandriva 2 01-26-2005 01:14 AM
copy files....using scp help me suguname Mandriva 5 01-25-2005 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration