开发者

how to perform ssh and scp equivalent function in python code [duplicate]

开发者 https://www.devze.com 2022-12-16 19:24 出处:网络
This question already has answers here: How to scp in Python? (13 answers) 开发者_运维问答Closed 9 years ago.
This question already has answers here: How to scp in Python? (13 answers) 开发者_运维问答 Closed 9 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消