sshRemoteAgentHostService.ts ×6

Frontier kind: Code frontier

unlabeled · c_ac1a5bd2a034

10 tests · 10632 LOC · 48 files · introduces 0 tests · 23 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges23 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1586 ranges10632 lines · 48 files · Browse complete extent
All tests (intent)
10 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 23 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/sshRemoteAgentHostService.ts 23 introduced LOC · 6 ranges

Open complete file

1173 switch (config.authMethod) {
1174 case SSHAuthMethod.Agent: {
1175 > // Try the agent first: if it has any of the configured identities sshRemoteAgentHostService.ts
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 }
1184 > const explicitKeyPath = config.privateKeyPath; sshRemoteAgentHostService.ts
1185 > const explicitIsDefault = explicitKeyPath !== undefined && SSHRemoteAgentHostMainService._isDefaultKeyPath(explicitKeyPath);
1186 > if (explicitKeyPath && !explicitIsDefault) {
1187 const explicit = await this._readKeyFileIfExists(explicitKeyPath);
1188 if (explicit) {
1190 }
1191 }
1192 > for (const keyPath of SSHRemoteAgentHostMainService._defaultKeyPaths) { sshRemoteAgentHostService.ts
1193 > const contents = await this._readKeyFileIfExists(keyPath);
1194 > if (contents) {
1195 attempts.push({ type: 'publickey', username, key: contents, keyPath, ...(isEncryptedPrivateKey(contents) ? { encrypted: true } : undefined) });
1196 }
1198 > // Final fallback: keyboard-interactive (typically a password prompt).
1199 > // Only meaningful if the server advertises it; the auth handler
1200 > // will skip it otherwise. The prompt is forwarded to the renderer
1201 > // via {@link onDidRequestKeyboardInteractive}.
1202 > attempts.push({ type: 'keyboard-interactive', username });
1203 > break;
1204 > }
1205 case SSHAuthMethod.KeyFile: {
1206 // KeyFile mode has no fallbacks — fail fast with a clear error if
1256
1257 protected _getAgentSocket(config: ISSHAgentHostConfig): string | undefined {
1258 > if (config.identityAgent !== undefined) { sshRemoteAgentHostService.ts
1259 return this._resolveIdentityAgent(config.identityAgent);
1260 }
1261 return this._isAgentAvailable();
1263
1264 private _resolveIdentityAgent(identityAgent: string): string | undefined {