[Twisted-Python] Twisted conch - ssh question

Hello everyone, I'm trying to get the sshsimpleserver.py and sshsimpleclient.py from the examples <http://twistedmatrix.com/projects/conch/documentation/examples/>to talk to each other. Both work fine with the standard linux ssh client/server respectively, but I couldn't get them to communicate with each other. All I want to do is simple data transfers to and fro, over the SSH channel (no commands to be executed). I could get the session established, but couldn't figure out how to do send data across from the client to the server. I tried channel.write, but that didn't appear to work. Sorry if this is too trivial a question, I'm a newbie to both Python and twisted. Any help would be greatly appreciated! -- Thanks & Regards, Ameya

On 03/31/2009 12:44 AM, Ameya Lokare wrote:
The two examples aren't made to work with each other. sshsimpleclient.py executes 3 commands on the remote server: `true`, `false`, and `cat`. sshsimpleserver.py doesn't accept commands: a shell opened up will server as a simple echo server. -p -- Paul Swartz paulswartz at gmail dot com http://paulswartz.net/ AIM: z3penguin

Thanks for the response, Paul. Sorry I wasn't clear before. I realize they are not made to work with each other. What I intended to ask was, what modifications are required to make them work with each other? Basically, I want to write both the ssh client and server with conch, and have them transfer some data to each other over the ssh channel. How can this be done? On Tue, Mar 31, 2009 at 8:39 AM, Paul Swartz <paulswartz@gmail.com> wrote:
-- Thanks & Regards, Ameya Lokare

On 03/31/2009 01:19 PM, Ameya Lokare wrote:
You can either make the server accept commands (see the execCommand() method on session.SSHSession) or tell the client to request a shell: self.conn.sendRequest(self, 'shell', '', wantReply=True) HTH, -p -- Paul Swartz paulswartz at gmail dot com http://paulswartz.net/ AIM: z3penguin

On 03/31/2009 12:44 AM, Ameya Lokare wrote:
The two examples aren't made to work with each other. sshsimpleclient.py executes 3 commands on the remote server: `true`, `false`, and `cat`. sshsimpleserver.py doesn't accept commands: a shell opened up will server as a simple echo server. -p -- Paul Swartz paulswartz at gmail dot com http://paulswartz.net/ AIM: z3penguin

Thanks for the response, Paul. Sorry I wasn't clear before. I realize they are not made to work with each other. What I intended to ask was, what modifications are required to make them work with each other? Basically, I want to write both the ssh client and server with conch, and have them transfer some data to each other over the ssh channel. How can this be done? On Tue, Mar 31, 2009 at 8:39 AM, Paul Swartz <paulswartz@gmail.com> wrote:
-- Thanks & Regards, Ameya Lokare

On 03/31/2009 01:19 PM, Ameya Lokare wrote:
You can either make the server accept commands (see the execCommand() method on session.SSHSession) or tell the client to request a shell: self.conn.sendRequest(self, 'shell', '', wantReply=True) HTH, -p -- Paul Swartz paulswartz at gmail dot com http://paulswartz.net/ AIM: z3penguin
participants (2)
-
Ameya Lokare
-
Paul Swartz