[Twisted-Python] Conch SSH help?
Nick Arnett
narnett at liveworld.com
Fri Jun 17 09:41:47 MDT 2005
Paul Swartz wrote:
>Since you clearly have code demonstrating this problem, could you try to
>fashion it into a minimal example and file a bug? (you can assign it to
>me) Also helpful would be the server you're trying to connect to. It
>may be that it's a problem on the server end.
>
The bug would be...? The failure of loseConnection()? I'm not sure
that's really a bug -- I think maybe it's a timing issue. I'm about to
try a couple of things in that regard. I guess the problem as I now see
it is a design issue -- the use of the "dataReceived" method, which is
so different from the usual way a callback passes results. But I'm not
at all sure that I understand how I'm supposed to be using this.
As for the server, it's a generic sshd on Solaris.
Digging into the source a bit more, I think I could make a reasonable
bug report. I see in the source that channelClosed should always be
called (which the example doesn't do). But it fails because it uses
channel_id, which is out of scope here. I tried changing all of the
occurrences of channel_id to self-channel_id, which seemed more
reasonable... but then I'm getting key errors when it is used for a
lookup in the localToRemoteChannel dict.
So... rather than just making a bug report, I'll see if I can't figure
out how to fix all this, since it seems to be scope problems. I really
need to get something working and this module seems to be better than
the other Python SSH gizmos I've tried. (And even though debugging
Twisted drives me crazy, I sure like what it does when it works.)
Nick
More information about the Twisted-Python
mailing list