[paramiko] Suggested addition to get channel from SSHClient (with patch)
Robey Pointer
robey at lag.net
Fri Nov 9 22:51:34 PST 2007
On Oct 23, 2007, at 6:25 AM, Paul Rouse wrote:
> This is a suggestion that SSHClient should provide methods
> for opening channels of any types (not just one on which a shell
> has been invoked).
>
> My reason is this: arguably the most useful service provided by
> SSHClient is its high-level handling of the SSH connection,
> particularly authentication. Once set up, though, there is
> sometimes a need to have more control over the channels, for
> example setting timeouts or merging stderr with stdout.
>
> It seems a shame to abandon the authentication aspects of SSHClient
> simply so that arbitrary channels can be opened (and it is
> probably even worse to get round it by accessing its private
> _transport attribute!)
>
> I have included a patch which simply exposes channel-creation
> methods on the underlying Transport. The alternative would
> be to provide direct access to the Transport, but to me that
> alternative does seem to cut too much across the levels.
Hm, several people have asked in the past for a way to access the
Transport object, for different reasons, so maybe I should just add an
accessor for that. I don't really want to start adding helper methods
to SSHClient for every method in Transport.
robey
More information about the paramiko
mailing list