Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-19-2009, 01:48 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
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.

Old 08-19-2009, 01:53 PM   #2
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 109

Rep: Reputation: 16
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


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
Why won't 'scp' let me copy to a remote computer? otter2244 Linux - Networking 7 10-05-2008 06:01 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
scp does not copy to a server??? malo_umoran Slackware 3 11-24-2006 04:13 AM
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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 PM.

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