Skip to content

Commit e3b1002

Browse files
committed
Allow to continue with other authentication methods on unknown key format.
1 parent d2bec0c commit e3b1002

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPublicKeyAuthentication.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import ch.cyberduck.core.LoginCallback;
2525
import ch.cyberduck.core.LoginOptions;
2626
import ch.cyberduck.core.exception.BackgroundException;
27-
import ch.cyberduck.core.exception.InteroperabilityException;
2827
import ch.cyberduck.core.exception.LoginCanceledException;
28+
import ch.cyberduck.core.exception.LoginFailureException;
2929
import ch.cyberduck.core.sftp.SFTPExceptionMappingService;
3030
import ch.cyberduck.core.threading.CancelCallback;
3131

@@ -106,7 +106,8 @@ public Boolean authenticate(final Host bookmark, final LoginCallback prompt, fin
106106
pubKey = null;
107107
break;
108108
default:
109-
throw new InteroperabilityException(String.format("Unknown key format for file %s", privKey.getName()));
109+
log.warn("Unknown key format for file {}", privKey.getName());
110+
throw new LoginFailureException(String.format("Unknown key format for file %s", privKey.getName()));
110111
}
111112
provider.init(new InputStreamReader(privKey.getInputStream(), StandardCharsets.UTF_8),
112113
pubKey != null ? new InputStreamReader(pubKey.getInputStream(), StandardCharsets.UTF_8) : null,

0 commit comments

Comments
 (0)