how to perform ssh and scp equivalent function in python code [duplicate]
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
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.
get paramiko or similar libraries.
精彩评论