Skip to content

Commit 5cf0fbb

Browse files
authored
Merge pull request #17603 from iterate-ch/bugfix/GH-17232
Restore fallback to read `SSH_AUTH_SOCK`
2 parents ea6937a + 076ebcc commit 5cf0fbb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ssh/src/main/java/ch/cyberduck/core/sftp/SFTPSession.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ private void authenticate(final SSHClient client, final Host host, final LoginCa
285285
defaultMethods.add(new SFTPAgentAuthentication(client, new WindowsOpenSSHAgentAuthenticator()));
286286
break;
287287
}
288-
final String configuration = new OpenSSHIdentityAgentConfigurator().getIdentityAgent(host.getHostname());
288+
String configuration = new OpenSSHIdentityAgentConfigurator().getIdentityAgent(host.getHostname());
289+
if(null == configuration) {
290+
configuration = System.getenv("SSH_AUTH_SOCK");
291+
}
289292
if(configuration != null) {
290293
final String identityAgent = LocalFactory.get(configuration).getAbsolute();
291294
log.debug("Determined identity agent {} for {}", identityAgent, host.getHostname());

0 commit comments

Comments
 (0)