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

SFTP connection not working with ssh key #12720

Closed
schveiguy opened this issue Dec 28, 2021 · 2 comments
Closed

SFTP connection not working with ssh key #12720

schveiguy opened this issue Dec 28, 2021 · 2 comments
Labels
help wanted sftp SFTP Protocol Implementation

Comments

@schveiguy
Copy link

Describe the bug
Previous to the latest update (8.1.2), I was able to connect to my company SFTP server. With the latest version (8.2.0), cyberduck is asking for my credentials, and will not properly connect with my ssh key. Using sftp command-line tool works to the server. Using ssh works to the server. Using cyberduck to sftp to another server with this same key works fine. If I use my username and password, it works.

Expected behavior
SFTP using ssh key works as it did in the previous version.

Screenshots
Not relevant, the app just asks for my username/password when it fails to use ssh key.

Desktop (please complete the following information):

  • OS: MacOS
  • Version 12.1

Log Files
cyberduck.log

@dkocher
Copy link
Contributor

dkocher commented Dec 29, 2021

Updated dependency in 617529b

@dkocher dkocher added sftp SFTP Protocol Implementation help wanted labels Dec 29, 2021
@dkocher
Copy link
Contributor

dkocher commented Dec 29, 2021

Relevant log output with authentication attempts

2021-12-28 16:58:16,651 [Thread-32] DEBUG ch.cyberduck.core.sftp.SFTPSession - Attempt login with 4 authentication methods [ch.cyberduck.core.sftp.auth.SFTPAgentAuthentication@2321766e, ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication@6eae27f, ch.cyberduck.core.sftp.auth.SFTPChallengeResponseAuthentication@163ecaf9, ch.cyberduck.core.sftp.auth.SFTPPasswordAuthentication@4ab435e8]
2021-12-28 16:58:16,651 [Thread-32] DEBUG ch.cyberduck.core.sftp.SFTPSession - Remaining authentication methods [publickey, password]
2021-12-28 16:58:16,651 [Thread-32] INFO  ch.cyberduck.core.sftp.SFTPSession - Attempt authentication with credentials Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}} and authentication method ch.cyberduck.core.sftp.auth.SFTPAgentAuthentication@2321766e
2021-12-28 16:58:16,651 [Thread-32] DEBUG ch.cyberduck.core.sftp.auth.SFTPAgentAuthentication - Login using agent OpenSSHAgentAuthenticator{proxy=com.jcraft.jsch.agentproxy.AgentProxy@628eb8d6} for Host{protocol=Profile{parent=sftp, vendor=iterate GmbH, description=null, image=null}, port=22, hostname='nrm-server2', credentials=Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}}, uuid='e9523dd8-f1c1-4d69-a166-08cceb5cc856', nickname='nrm-server2 – Sales proposals', defaultpath='/home/share/public/public/Docs/Sales Proposals', workdir=null, labels=null}
2021-12-28 16:58:16,652 [Thread-32] DEBUG ch.cyberduck.core.sftp.openssh.OpenSSHAgentAuthenticator - Retrieve identities from proxy com.jcraft.jsch.agentproxy.AgentProxy@628eb8d6
2021-12-28 16:58:16,652 [Thread-32] DEBUG ch.cyberduck.core.sftp.openssh.OpenSSHAgentAuthenticator - Found 0 identities
2021-12-28 16:58:16,652 [Thread-32] WARN  ch.cyberduck.core.sftp.SFTPSession - Login refused with credentials Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}} and authentication method ch.cyberduck.core.sftp.auth.SFTPAgentAuthentication@2321766e
2021-12-28 16:58:16,652 [Thread-32] DEBUG ch.cyberduck.core.sftp.SFTPSession - Remaining authentication methods [publickey, password]
2021-12-28 16:58:16,652 [Thread-32] INFO  ch.cyberduck.core.sftp.SFTPSession - Attempt authentication with credentials Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}} and authentication method ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication@6eae27f
2021-12-28 16:58:16,652 [Thread-32] DEBUG ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication - Login using public key authentication with credentials Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}}
2021-12-28 16:58:16,652 [Thread-32] INFO  ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication - Reading private key Local{path='/Users/steves/.ssh/id_rsa'} with key format OpenSSH
2021-12-28 16:58:16,672 [Thread-32] DEBUG net.schmizz.concurrent.Promise - Setting <<authenticated>> to `null`
2021-12-28 16:58:16,672 [Thread-32] DEBUG net.schmizz.sshj.userauth.UserAuthImpl - Trying `publickey` auth...
2021-12-28 16:58:16,672 [Thread-32] DEBUG net.schmizz.sshj.userauth.method.AuthPublickey - Attempting authentication using PKCS8KeyFile{resource=[PrivateKeyReaderResource] java.io.InputStreamReader@340aade7}
2021-12-28 16:58:16,684 [Thread-32] DEBUG net.schmizz.concurrent.Promise - Awaiting <<authenticated>>
2021-12-28 16:58:16,845 [reader] DEBUG net.schmizz.concurrent.Promise - Setting <<authenticated>> to `false`
2021-12-28 16:58:16,845 [Thread-32] DEBUG net.schmizz.sshj.userauth.UserAuthImpl - `publickey` auth failed
2021-12-28 16:58:16,846 [Thread-32] WARN  ch.cyberduck.core.sftp.SFTPSession - Login failed with credentials Credentials{user='steves', oauth='OAuthTokens{accessToken='null', refreshToken='', expiryInMilliseconds=9223372036854775807}', token='', identity=Local{path='/Users/steves/.ssh/id_rsa'}} and authentication method ch.cyberduck.core.sftp.auth.SFTPPublicKeyAuthentication@6eae27f

Please check the server log for the authentication failure reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted sftp SFTP Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants