supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Oct 6 10:18:28 CEST 2007


In message <1191594819.381604.20680 at o80g2000hse.googlegroups.com>,
timw.google wrote:

> I want to write a python script that runs rsync on a given directory
> and host. I build the command line string, but when I try to run
> subprocess.call(cmd), or p=subprocess.Popen(cmd, shell=True),or
> os.system(cmd), I get prompted for my login password.

Why not set up a public/private SSH key pair between the accounts on the two
machines? Then you can get in without a password.




More information about the Python-list mailing list