PATCH: use openssh in the sftp transport when available

James Henstridge james at jamesh.id.au
Tue Nov 29 07:40:40 GMT 2005


The attached patch is the diff between bzr.dev and my bzr.sftp branch:
    http://people.ubuntu.com/~jamesh/bzr.sftp

The main changes are:

    * if an acceptable ssh executable is available, spawn it as a
      subprocess instead of using paramiko's builtin ssh transport
      code.  The paramiko sftp implementation is still used.
    * clean up the URL handling in the sftp transport a bit, using the
      urlparse module instead of regular expressions.

I've based the ssh invocation arguments on what gnome-vfs's sftp module
does, so it should be correct.

Using the system ssh executable has the following benefits:

   1. compression can be used (if enabled in ~/.ssh/config)
   2. parse all ~/.ssh/config options (alternative usernames, proxy
      command, host aliases).
   3. support all authentication methods that the standard ssh supports.

It should be possible to extend this code to use Putty's plink.exe on
Windows, which would provide interoperability with Putty's ssh agent too.

James.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bzr-openssh-support.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051129/3c2733ae/attachment.diff 


More information about the bazaar mailing list