Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a python script to launch remote linux commands from my local machine. The target(s) is/are a list of server(s). I am able to launch the commands no problem; however, the commands result in log files on the target. I would like to pull down these log files to my local machine after they are written (pull them down programmatically).

Is there a way I can "PULL" a file down from a remote machine via a secure connection in such a way that the transfer is initialized locally?

Thanks in advance!

share|improve this question

Yep. Scp is included with openssh. If you need to transfer multiple files you can also use rsync -e ssh

share|improve this answer
scp also supports transferring of multiple files. It even supports recursive directory transfers. – Manuel Faux Jul 30 '09 at 18:33
scp /some/local/path

Or use rsync.

share|improve this answer

The syntax for scp and rsync is always:

scp <source> <destination>

So it doesn't really matter which machine you do it from, the remote machine can either be the source or the destination. You do however, at least with rsync -e ssh, have to be on one of the two machines.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.