Merge lp:~spiv/bzr/paramiko-keyboard-interactive into lp:bzr/2.0

Proposed by Andrew Bennetts
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~spiv/bzr/paramiko-keyboard-interactive
Merge into: lp:bzr/2.0
Diff against target: 36 lines
2 files modified
NEWS (+4/-0)
bzrlib/transport/ssh.py (+10/-1)
To merge this branch: bzr merge lp:~spiv/bzr/paramiko-keyboard-interactive
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+12559@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) wrote :

This is a simple change that hopefully fixes bug 433846. Ideally I'd want an affected user to confirm that it fixes the problem for them before merging, but I think this simple change makes sense.

I think this bug fix would be a good candidate for inclusion 2.0.1.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2009-09-28 02:02:30 +0000
+++ NEWS 2009-09-29 02:06:15 +0000
@@ -18,6 +18,10 @@
18 filename will issue a warning and skip over those files.18 filename will issue a warning and skip over those files.
19 (Robert Collins, #3918)19 (Robert Collins, #3918)
2020
21* bzr will attempt to authenticate with SSH servers that support
22 ``keyboard-interactive`` auth but not ``password`` auth when using
23 Paramiko. (Andrew Bennetts, #433846)
24
21Improvements25Improvements
22************26************
2327
2428
=== modified file 'bzrlib/transport/ssh.py'
--- bzrlib/transport/ssh.py 2009-08-22 05:01:55 +0000
+++ bzrlib/transport/ssh.py 2009-09-29 02:06:15 +0000
@@ -504,7 +504,16 @@
504 except paramiko.SSHException, e:504 except paramiko.SSHException, e:
505 # Don't know what happened, but just ignore it505 # Don't know what happened, but just ignore it
506 pass506 pass
507 if 'password' not in supported_auth_types:507 # We treat 'keyboard-interactive' and 'password' auth methods identically,
508 # because Paramiko's auth_password method will automatically try
509 # 'keyboard-interactive' auth (using the password as the response) if
510 # 'password' auth is not available. Apparently some Debian and Gentoo
511 # OpenSSH servers require this.
512 # XXX: It's possible for a server to require keyboard-interactive auth that
513 # requires something other than a single password, but we currently don't
514 # support that.
515 if ('password' not in supported_auth_types and
516 'keyboard-interactive' not in supported_auth_types):
508 raise errors.ConnectionError('Unable to authenticate to SSH host as'517 raise errors.ConnectionError('Unable to authenticate to SSH host as'
509 '\n %s@%s\nsupported auth types: %s'518 '\n %s@%s\nsupported auth types: %s'
510 % (username, host, supported_auth_types))519 % (username, host, supported_auth_types))

Subscribers

People subscribed via source and target branches