I've been playing around with Twisted's Conch client (which looks extremely well done, thanks!). I've been able to connect to a conch server and also connect to other ssh servers and execuate various commands. I'd like to be able to connect to an arbitrary SSH server and run /bin/bash.

I'm able to execute a command like so:

class CommandChannel(channel.SSHChannel):
    def channelOpen(self, data):
            self, 'exec', common.NS(self.command), wantReply=True).addCallback(

Looking through the SSH spec (connect protocol, rfc4254), it looks like shells are opened with this command.


uint32 recipient channel
string "shell"
boolean want reply

It doesn't look like Conch supports these requests (here's how CHANNEL_REQUESTs are currently sent out)

twisted/conch/ssh/connection.py (413):
        self.transport.sendPacket(MSG_CHANNEL_REQUEST, struct.pack('>L',
                                  + common.NS(requestType)+chr(wantReply)
                                  + data)

I may be misunderstanding how remote shells are started, so any help would be appreciated.

Again, I'm trying to launch an interactive /bin/bash shell from a Conch SSH client on an arbitrary remote SSH server.

Thanks for your time.

Best Regards,
Bill Zeller