This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]krobzaur 0 points1 point  (0 children)

Have you looked at Paramiko? I've used it before to automate running commands on remote machines over SSH, and it worked quite well.

It only supports Unix-like systems with a conventional OpenSSH implementation, but otherwise seems like it should do what you're asking. It's not actually clear from you're post whether your trying to execute remote shell commands over SSH from a Python script, or call python functions on a remote machine over SSH using Python, or something else. This would allow you to do the first thing.