Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception reading public key in OpenSSH key format #15239

Closed
mjwelchphd opened this issue Oct 22, 2023 · 7 comments
Closed

Exception reading public key in OpenSSH key format #15239

mjwelchphd opened this issue Oct 22, 2023 · 7 comments
Assignees
Labels
sftp SFTP Protocol Implementation
Milestone

Comments

@mjwelchphd
Copy link

The update I installed on Oct 17, 2023 Version 8.7.0 no longer logged into an AWS EC2 server with PKA. I reverted back to Version 8.6.3 (40040) and that still works. I regret to say I was unable to discover any reason.

Model Name: MacBook Air
Model Identifier: MacBookAir10,1
Model Number: Z128000DMLL/A
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 10151.41.12
OS Loader Version: 10151.41.12
Serial Number (system): FVFFV0VCQ6LX
Hardware UUID: BC025F03-3A91-5DAA-ABC7-937C1A8C85D8
Provisioning UDID: 00008103-001A25A61479001E
Activation Lock Status: Enabled

macOS Sonoma 14.1 (beta)

@dkocher
Copy link
Contributor

dkocher commented Oct 23, 2023

Please attach a debug log from Preferences → Connection.

@dkocher dkocher added the sftp SFTP Protocol Implementation label Oct 23, 2023
@dkocher dkocher self-assigned this Oct 23, 2023
@dkocher dkocher added this to the 8.7.1 milestone Oct 23, 2023
@dkocher
Copy link
Contributor

dkocher commented Oct 23, 2023

2023-10-23 12:11:51,198 [Thread-27] DEBUG ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication - Login using public key authentication with credentials Credentials{user='live', password='', tokens='STSTokens{accessKeyId='', secretAccessKey='', sessionToken='', expiryInMilliseconds=9223372036854775807}', oauth='OAuthTokens{accessToken='', refreshToken='', idToken='', expiryInMilliseconds=9223372036854775807}', identity=Local{path='/Users/mike/.ssh/chicago-office-west'}}
2023-10-23 12:11:51,198 [Thread-27] INFO  ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication - Reading private key Local{path='/Users/mike/.ssh/chicago-office-west'} with key format OpenSSH
2023-10-23 12:11:51,205 [Thread-27] WARN  ch.cyberduck.core.threading.BackgroundCallable - Failure running background task WorkerBackgroundAction{worker=MountWorker{cache=ch.cyberduck.core.ReverseLookupCache@6c075e9d}}
java.lang.Exception: null
	at ch.cyberduck.core.threading.BackgroundCallable.<init>(BackgroundCallable.java:38) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.DefaultBackgroundExecutor.execute(DefaultBackgroundExecutor.java:81) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.AbstractController.background(AbstractController.java:72) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.ui.cocoa.controller.BrowserController$34.run(BrowserController.java:3288) ~[osx-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.ui.cocoa.controller.BrowserController$37.run(BrowserController.java:3419) ~[osx-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.ui.cocoa.controller.BrowserController$38.cleanup(BrowserController.java:3438) ~[osx-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable$1.run(BackgroundCallable.java:76) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at org.rococoa.internal.MainThreadUtils$3.callback(MainThreadUtils.java:91) ~[rococoa-core-0.9.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:585) [jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:616) [jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.Native.invokeVoid(Native Method) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.Function.invoke(Function.java:415) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.Function.invoke(Function.java:361) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.Function.invoke(Function.java:315) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at org.rococoa.internal.MsgSendHandler.invoke(MsgSendHandler.java:114) ~[rococoa-core-0.9.1.jar:?]
	at com.sun.jna.Library$Handler.invoke(Library.java:263) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at jdk.proxy2.$Proxy5.syntheticSendMessage(Unknown Source) ~[?:?]
	at org.rococoa.Foundation.send(Foundation.java:207) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.Foundation.send(Foundation.java:181) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.ObjCObjectInvocationHandler.sendOnThisOrMainThread(ObjCObjectInvocationHandler.java:245) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.ObjCObjectInvocationHandler.invokeCocoa(ObjCObjectInvocationHandler.java:212) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.ObjCObjectInvocationHandler.intercept(ObjCObjectInvocationHandler.java:171) ~[rococoa-core-0.9.1.jar:?]
	at ch.cyberduck.binding.application.NSApplication$$ByRococoa.run(<generated>) ~[binding-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.ui.cocoa.MainApplication.main(MainApplication.java:126) ~[osx-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
Caused by: net.schmizz.sshj.common.SSHRuntimeException: net.schmizz.sshj.common.Buffer$BufferException: Underflow
	at net.schmizz.sshj.common.Buffer.readPublicKey(Buffer.java:491) ~[sshj-0.35.0.jar:?]
	at com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyFileUtil.initPubKey(OpenSSHKeyFileUtil.java:59) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.initPubKey(OpenSSHKeyFile.java:89) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.init(OpenSSHKeyFile.java:62) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider.init(BaseFileKeyProvider.java:55) ~[sshj-0.35.0.jar:?]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:94) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:53) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.authenticate(SFTPSession.java:354) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.login(SFTPSession.java:263) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.KeychainLoginService.authenticate(KeychainLoginService.java:196) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.authenticate(LoginConnectionService.java:166) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.connect(LoginConnectionService.java:157) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.check(LoginConnectionService.java:100) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.pool.StatelessSessionPool.borrow(StatelessSessionPool.java:56) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.run(SessionBackgroundAction.java:115) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction$1.call(SessionBackgroundAction.java:106) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.DefaultRetryCallable.call(DefaultRetryCallable.java:52) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.call(SessionBackgroundAction.java:108) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.run(BackgroundCallable.java:96) [core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.call(BackgroundCallable.java:60) [core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
	at ch.cyberduck.core.threading.DispatchExecutorService$InvocationFutureTask.run(DispatchExecutorService.java:281) [libcore-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.rococoa.internal.OCInvocationCallbacks.callMethod(OCInvocationCallbacks.java:170) [rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks.access$200(OCInvocationCallbacks.java:52) [rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks$2.callback(OCInvocationCallbacks.java:82) [rococoa-core-0.9.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:585) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:616) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
Caused by: java.security.GeneralSecurityException: net.schmizz.sshj.common.Buffer$BufferException: Underflow
	at net.schmizz.sshj.common.KeyType$1.readPubKeyFromBuffer(KeyType.java:59) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readPublicKey(Buffer.java:489) ~[sshj-0.35.0.jar:?]
	at com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyFileUtil.initPubKey(OpenSSHKeyFileUtil.java:59) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.initPubKey(OpenSSHKeyFile.java:89) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.init(OpenSSHKeyFile.java:62) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider.init(BaseFileKeyProvider.java:55) ~[sshj-0.35.0.jar:?]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:94) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:53) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.authenticate(SFTPSession.java:354) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.login(SFTPSession.java:263) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.KeychainLoginService.authenticate(KeychainLoginService.java:196) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.authenticate(LoginConnectionService.java:166) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.connect(LoginConnectionService.java:157) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.check(LoginConnectionService.java:100) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.pool.StatelessSessionPool.borrow(StatelessSessionPool.java:56) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.run(SessionBackgroundAction.java:115) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction$1.call(SessionBackgroundAction.java:106) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.DefaultRetryCallable.call(DefaultRetryCallable.java:52) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.call(SessionBackgroundAction.java:108) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.run(BackgroundCallable.java:96) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.call(BackgroundCallable.java:60) [core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at ch.cyberduck.core.threading.DispatchExecutorService$InvocationFutureTask.run(DispatchExecutorService.java:281) ~[libcore-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.rococoa.internal.OCInvocationCallbacks.callMethod(OCInvocationCallbacks.java:170) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks.access$200(OCInvocationCallbacks.java:52) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks$2.callback(OCInvocationCallbacks.java:82) ~[rococoa-core-0.9.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:585) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:616) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
Caused by: net.schmizz.sshj.common.Buffer$BufferException: Underflow
	at net.schmizz.sshj.common.Buffer.ensureAvailable(Buffer.java:137) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readRawBytes(Buffer.java:260) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readRawBytes(Buffer.java:255) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readBytes(Buffer.java:225) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readMPInt(Buffer.java:352) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.KeyType$1.readPubKeyFromBuffer(KeyType.java:57) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.common.Buffer.readPublicKey(Buffer.java:489) ~[sshj-0.35.0.jar:?]
	at com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyFileUtil.initPubKey(OpenSSHKeyFileUtil.java:59) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.initPubKey(OpenSSHKeyFile.java:89) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.init(OpenSSHKeyFile.java:62) ~[sshj-0.35.0.jar:?]
	at net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider.init(BaseFileKeyProvider.java:55) ~[sshj-0.35.0.jar:?]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:94) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication.authenticate(SFTPPublicKeyAuthentication.java:53) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.authenticate(SFTPSession.java:354) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.sftp.SFTPSession.login(SFTPSession.java:263) ~[ssh-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.KeychainLoginService.authenticate(KeychainLoginService.java:196) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.authenticate(LoginConnectionService.java:166) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.connect(LoginConnectionService.java:157) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.LoginConnectionService.check(LoginConnectionService.java:100) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.pool.StatelessSessionPool.borrow(StatelessSessionPool.java:56) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.run(SessionBackgroundAction.java:115) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction$1.call(SessionBackgroundAction.java:106) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.DefaultRetryCallable.call(DefaultRetryCallable.java:52) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.SessionBackgroundAction.call(SessionBackgroundAction.java:108) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.run(BackgroundCallable.java:96) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at ch.cyberduck.core.threading.BackgroundCallable.call(BackgroundCallable.java:60) ~[core-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at ch.cyberduck.core.threading.DispatchExecutorService$InvocationFutureTask.run(DispatchExecutorService.java:281) ~[libcore-8.7.0.jar:ff30c15e4dc1a3309955f1726a78acd7e9385bbb]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.rococoa.internal.OCInvocationCallbacks.callMethod(OCInvocationCallbacks.java:170) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks.access$200(OCInvocationCallbacks.java:52) ~[rococoa-core-0.9.1.jar:?]
	at org.rococoa.internal.OCInvocationCallbacks$2.callback(OCInvocationCallbacks.java:82) ~[rococoa-core-0.9.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:585) ~[jna-min-5.12.1.jar:5.12.1 (b0)]
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:616) ~[jna-min-5.12.1.jar:5.12.1 (b0)]

@dkocher
Copy link
Contributor

dkocher commented Oct 23, 2023

Regression from d823292.

@dkocher
Copy link
Contributor

dkocher commented Oct 24, 2023

@mjwelchphd Can you check the format of the public key saved in /Users/mike/.ssh/chicago-office-west.pub.

@dkocher dkocher changed the title Cyberduck no longer connects using PKA Exception reading public key in OpenSSH key format Oct 24, 2023
@mjwelchphd
Copy link
Author

mjwelchphd commented Oct 25, 2023

As far as I can see, it's rsa PEM format. The openssl on my macOS Sonoma 14.1 (23B73) will not read any of my .pub files, although I can still connect with 'terminal' and Cyberduck 8.6.3 to my website (AWS EC-2 Debian 11). I rarely use openssl, but I've never had this problem before. I suspect incompatible software updates, but I don't have any way to verify that.

Here's the chicago-office-west.pub file:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD6wvN1g5pJnQ7X6VpU9JIu2XdxVJe8en8N8VOrao+OcxmSa5ENAn
53hkjoW52wNj2sJoktB5dMSrebEnYpQ8tYLgrPoIbfYDc2d9eEcIrfIMEnLMSG7GG/4TMoygUAYZDQx2yGbsFzbXcR
t3+kHnA9Beu5T5wJn/+Q1mq6YDyu06adXap+fiejwuDXtZrH8TyuFFprYkELazZ5yY1LWSBCLE1EVEqtPPVsBXth0X
XMIpcanDRQEl6oaqzh66PYO5WhNVTI67wY3PnDMe8y7Fr32gMqAXM6ZRK2382KuRQiWxUdOGQ1XBfFLqAH5tSpE9Y5
Qakn5hN0DbrAy4bWya55 chicago-office-west

I generated a pair of new files using ssh-keygen, and I couldn't read them with openssl either. I also tried the same on Debian 11 and I was also NOT able to read .pub files there with openssl.

One other note though: openssl on Debian 11 and openssl on macOS Sonoma 14.1 differ considerably. Oh, and I checked the files on the Mac to be sure they had NO xttrs, so that isn't the problem. I didn't attempt to reload openssl from homebrew yet. If I can find the time, I'll attempt to create new PKA files using another method to see if I can find a difference. I need to try creating and reading the files with the same openssl app. Theoretically, that should work.

—mike

@dkocher
Copy link
Contributor

dkocher commented Oct 25, 2023

Reverted in 59e1843 which will fix this. Not yet sure how this can be reproduced with the given public key. Fix will need to be part of #15254.

@dkocher dkocher closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sftp SFTP Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants