Well Marcin, I think that looks pretty much close to what I want to achieve, so I haven&#39;t found any working example of this (yet :s). Can you share your code with us?<br><br><div><span class="gmail_quote">On 10/11/07, 
<b class="gmail_sendername">Marcin Kasperski</b> &lt;<a href="mailto:Marcin.Kasperski@softax.com.pl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Marcin.Kasperski@softax.com.pl</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I will allow myself to add to the question:<br><br>Does there exist any example of SSH connection which instead of just<br>running a command, allows interaction with remote application (feeding<br>its stdin, reading its stdout)?
<br><br>My personal use case is &#39;remote UCI engine&#39; - application which logins<br>via ssh to remote machine, spawns fruit (or wine rybka.exe, or<br>whatever) there, and then forwards anything obtained on (local) stdin
<br>to this app stdin and forwards anything obtained from remote app to<br>(local) stdout. Plus, in case of disconnect, relogin-s, restarts the<br>app and resends initialization commands.&nbsp;&nbsp;Just a way to bind Fritz run<br>

on laptop to the engine run on stronger server.<br><br>I even managed to write more-or-less working code, but it turned out<br>to be so horrible mess, that I gave up an idea of maintaining it in a<br>long term...<br></blockquote>

</div><br><br>Paul, I&#39;m working right now with the code you&#39;ve send, and there is an error that I can&#39;t understand, when the execution reach the line &quot;<span style="font-style: italic;">self.connection.runCommand
(deferred, cmd, *args)</span>&quot; in the CommandClientFactory class, it throws an error saying:<br><br>&quot;<span style="font-style: italic;">TypeError: unbound method runCommand() must be called with ClientConnection instance as first argument (got Deferred instance instead)
</span>&quot;<br><br><br>...but the runCommand method definition of ClientConnection class is like this: &quot;<span style="font-style: italic;">def runCommand(self, d, command, *args):</span>&quot;, so it looks OK to me (by this I mean, that it looks like it want to receive a deferred instance at first arg), any clue on this???
<br><br>