[RFC] using plink.exe on windows as ssh client?

John Arbash Meinel john at arbash-meinel.com
Sun Nov 5 19:17:22 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> On svn there is config parameter to specify ssh client. So on windows
> one can specify
> 
> ssh = path/plink.exe -l user -i path/key.ppk
> 
> and works with any SSH keys for authorisation.
> 
> Why bzr does not support usage of custom SSH private key file?
> 
> It's related to bug 70398: https://launchpad.net/bugs/70398
> 
> --
> Alexander

Well, for starters, we don't support using plink as the ssh sub-process,
because we normally just auto-detect what ssh to use (doing 'ssh -V')

If you wanted to, it wouldn't be terribly hard to auto detect an ssh
client, or even add a config entry to specify one. We just haven't had
the need.

Autodetecting Putty is a little bit of a pain, because by default,
Windows doesn't put things in your executable search path.

If you want, we could look in some obvious places, like try "plink.exe"
and then "C:\Program Files\Putty\plink.exe".

It would be good to know what parameters to pass to plink. I'm pretty
sure it supports user at host.

If you wanted to setup a config entry for the default ssh program to
use, you could add an entry to the config for "ssh_command =
/path/to/command" and another one for "ssh_options = -i path/key.ppk"

I wanted to separate the two, because of issues with spaces in paths,
versus arguments, etc. Someone was working on a patch to allow us to use
"" to indicate that sort of thing, but it is tricky because shlex
doesn't support Unicode strings.

The other tricky thing is that Transport objects don't have access to
anything but Global Config at the moment. So far things have been
configured per-branch, which is sort of a location, but by the time you
are creating a Transport and connecting, you are at a different
location. Branch Config can also use the local .bzr/branch/branch.conf
to find information, rather than only going to ~/.bazaar/locations.conf

So if you would want that, it would be difficult to do for transports.

I'm getting away from the point, though.

bzr doesn't have it, because we haven't strictly needed it yet. If you
want it, then we can certainly work out how to add it.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFTjjCJdeBCYSNAAMRAm/ZAKCF1md9znbb7qILl81phNuP5ai7oQCgxjO0
3jts09cat0gHGGLX0tFfjqo=
=l+U3
-----END PGP SIGNATURE-----




More information about the bazaar mailing list