cRRunner
cRemote Runner is a module that allows us to copy some files remotely, run or execute on that remote, then copy things back. Internally it uses Paramiko as an SSH interface.
How to Use
from crrunner import *
eventList = [
ExecuteEvent('ls')
]
'''
We also have:
CopyToRemoteEvent - To copy files to the remote from local
CopyFromRemoteEvent - To copy files from the remote to local
DeleteAllCopiedToRemote - To delete all files (on remote) copied to remote thus far.
'''
runner = cRRunner(remoteIp=<ip>, remoteUserName=<user>, remotePassword=<password>, eventList=eventList)
resultList = runner.run()
print (resultList[0].stdout)
More Info
See the docstrings for classes in crrunner.py/event.py
Also see if __name__ == '__main__':
in crrunner.py for a more interesting example.
How to Install
pip install cRRunner