1173
switch (config.authMethod) {
1174
case SSHAuthMethod.Agent: {
1176
>
// loaded, auth succeeds without ever touching on-disk keys. This
1177
>
// matches OpenSSH's IdentityAgent semantics and avoids an
1178
>
// unnecessary passphrase prompt when an encrypted key file is
1179
>
// configured but the agent already holds its unlocked copy.
1180
>
const agentSock = this._getAgentSocket(config);
1181
>
if (agentSock) {
1182
attempts.push({ type: 'agent', username, agent: agentSock });
1183
}
1185
>
const explicitIsDefault = explicitKeyPath !== undefined && SSHRemoteAgentHostMainService._isDefaultKeyPath(explicitKeyPath);
1186
>
if (explicitKeyPath && !explicitIsDefault) {
1187
const explicit = await this._readKeyFileIfExists(explicitKeyPath);
1188
if (explicit) {