Skip to content

Commit 076ebcc

Browse files
committed
Restore fallback to read SSH_AUTH_SOCK from env with no explicit configuration for identity agent.
1 parent ea6937a commit 076ebcc

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)