pxssh - control an SSH session¶
Note
pxssh is a screen-scraping wrapper around the SSH command on your system. In many cases, you should consider using Paramiko or RedExpect instead. Paramiko is a Python module which speaks the SSH protocol directly, so it doesn’t have the extra complexity of running a local subprocess. RedExpect is very similar to pxssh except that it reads and writes directly into an SSH session all done via Python with all the SSH protocol in C, additionally it is written for communicating to SSH servers that are not just Linux machines. Meaning that it is extremely fast in comparison to Paramiko and already has the familiar expect API. In most cases RedExpect and pxssh code should be fairly interchangeable.