I want to login in different machine in the network and copy a file from that machine to my machine.I want to do this using python.Any idea how can i do this .I have python 2.5 a nd ubuntu 8.10
-
Or this one, with different constraints: stackoverflow.com/questions/68335/…Tobu– Tobu2010-01-13 11:50:01 +00:00Commented Jan 13, 2010 at 11:50
-
there is scp in python to from where i can download that moduleha22109– ha221092010-01-14 05:57:19 +00:00Commented Jan 14, 2010 at 5:57
-
@Amit: indeed, it is a dup.László Papp– László Papp2013-12-10 09:51:11 +00:00Commented Dec 10, 2013 at 9:51
Add a comment
|
2 Answers
Use subprocess and call scp directly. This has the advantage of using your ssh settings, private keys and agent.
Look into Fabric if you need a more structured framework for doing local and remote operations.
Comments
get paramiko or similar libraries.
1 Comment
ha22109
i have install paramiko but when type import paramiko in python shell it gives me error ImportError "No module named Crypto.Util.randpool" File: /usr/lib/python2.5/site-packages/paramiko/rng.py, Then i downloaded the PyCrypto tar but it is not installing up