If you create more than one instances of pyssh,Ssh in the same process, then the process hangs when you close() any of them.
The problem is that each instance registers a signal handler to handle SIGCHLD, so each of them sees the signal, and each of them calls a blocking os.waitpid() on the pid its own SSH process. When the first SIGCHLD arrives, all the instances call a blocking os.waitpid(), even those which do not expect their SSH subprocess to exit.
The solution is to use a nonblocking os.waitpid() call.
example code that fails because of this bug
patch to fix the bug
Logged In: YES
user_id=1700532
Originator: YES
File Added: pyssh0.3-sighandler_bug.diff