开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜