LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using SCP to copy to local (http://www.linuxquestions.org/questions/linux-newbie-8/using-scp-to-copy-to-local-748801/)

knghtz 08-19-2009 01:48 PM

Using SCP to copy to local
 
Hi all,

I need to create that will copy some files from one location to another. My plan is to use scp and copy them to my local computer and then copy them from there to the other server's directory (as far as I know you can't scp from two different hosts, but I'm probably wrong here). I'm having problems copying locally because I'm running the script from a different machine (One that has keys so as to not have to use passwords in the script, for security purposes I can't do this locally on my machine but I can copy the files there).

Any help would be appreciated.

Thanks!

wolfperkins 08-19-2009 01:53 PM

You can achieve this through a single ssh call:
Code:

$ ssh -A user@source_host scp -r /path/to/source/files target_host:/path/to/folder/on/target/host


All times are GMT -5. The time now is 12:38 PM.