-   Linux - Newbie (
-   -   Using SCP to copy to local (

knghtz 08-19-2009 02: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.


wolfperkins 08-19-2009 02:53 PM

You can achieve this through a single ssh call:

$ 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 10:28 AM.