I've used twisted to make an SSH server similar to the one shown here. My question is, is it possible to use multithreading to run multiple commands simultaneously? I tried making a do_ function that started a thread and that didn't accomplish what I was after. Should I make multiple client connections instead?
2
votes
I actually just tried multiple client connections and they still could not run commands simultaneously.
- sajattack
You can multiplex several channels over a single SSH connection. I think that sounds like what you want.
- jathanism
Please read <sscce.org> and then provide a minimal example. It's very difficult to talk about your problem without actually knowing what it is.
- Jean-Paul Calderone
Perhaps it's hard to see. The "here" in my question is a hyperlink to an example.
- sajattack
1 Answers
2
votes
Perhaps you should look at adding Twisted sub process spawning support to your code?
http://twistedmatrix.com/documents/current/core/howto/process.html
... it's a bit hard to be more specific as you haven't included any code for us to comment on.