[Cyberduck-trac] [Cyberduck] #1016: SFTP: Login Not Attempting Public Key Authentication
Cyberduck
trac at trac.cyberduck.ch
Mon Feb 5 08:09:59 CET 2007
#1016: SFTP: Login Not Attempting Public Key Authentication
---------------------+------------------------------------------------------
Reporter: ibrandt | Owner: dkocher
Type: defect | Status: assigned
Priority: normal | Milestone: 2.7.3
Component: sftp | Version: 2.7.2
Severity: normal | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by ibrandt):
Interesting as I think I just found the issue, but it doesn't appear
related to localization:
CDConnectionController line
[http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/ui/cocoa/CDConnectionController.java#L608
608] calls:
{{{
host.getCredentials().setPrivateKeyFile(pkLabel.stringValue());
}}}
but then
[http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/ui/cocoa/CDConnectionController.java#L641
641] calls:
{{{
host.setCredentials(usernameField.stringValue(), passField.stringValue(),
keychainCheckbox.state() == NSCell.OnState);
}}}
which in turn in Host
[http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/core/Host.java#L454
454] does:
{{{
this.setCredentials(new Login(this.getHostname(), this.getProtocol(),
username, password, addToKeychain));
}}}
The "new Login" there loses the existing Login.privateKeyFile value.
When we get to SFTPSession line
[http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/core/sftp/SFTPSession.java#L286
286] the call to host.getCredentials().usesPublicKeyAuthentication()
returns false on account of the null privateKeyFile value, and public key
authentication is not attempted.
I couldn't get Xcode to stop at my breakpoints, so this analysis is based
on a quick reading of the code and compiling in a few debug statements. I
very well may have erred, or perhaps this chain of events is only
triggered for certain locales?
--
Ticket URL: <http://trac.cyberduck.ch/ticket/1016#comment:4>
Cyberduck <http://cyberduck.ch>
FTP and SFTP Browser for Mac OS X.
More information about the Cyberduck-trac
mailing list