An SSH automation library using expect.
RedExpect makes automating remote machines over SSH very easy to do and is very fast in doing exactly what you ask of it. Based on ssh2-python (which provides libssh2 bindings for python) and made into an easy to use SSH library via RedSSH. If you're familiar with using expect but would like the easy of use and accessibilty of python, then look no further!
RedExpect can be installed via pip with
pip install redexpect or the latest commit, which may not be the most stable, from git with
pip install git://email@example.com/Red_M/RedExpect.git
99% of questions around how to do something should be answered in the documentation. If something is not there please raise an issue so it can be added to the documentation. Now with autodocs!
Why not use ?
This is my experiences with other pieces of software to do something similar or the same as RedExpect. It mostly revolves around compatibility with remote servers, (lack of) state(less) based automation or lack of features.
I've had issues with other software in the past and sometimes I found that other software doesn't want to do what I want it to do. I should be able to open and close SSH tunnels at a whim, start up SCP/SFTP and access other lower level features of SSH at any time.
I've had issues with accessing non-Linux devices that have weird versions or custom compiles of the OpenSSH server or are completely custom SSH servers. Because of incompatibility in other libraries, RedExpect isn't designed with just Linux in mind, its meant to control everything you can think of that has SSH. If you can connect to it via your regular OpenSSH client then RedExpect/RedSSH should be able to connect as well.
I don't want to install an agent or have to manage state of a remote machine, if I want something done it should just be applied, I don't want extra things to manage or leave hanging around.
- Unit tests
- More examples
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size redexpect-2.0.1-py2.py3-none-any.whl (19.3 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size redexpect-2.0.1.tar.gz (9.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for redexpect-2.0.1-py2.py3-none-any.whl