-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
For microsoft/vscode-remote-release#16 (comment)
We need a way for the remote resolver to set the SSH_AUTH_SOCK environment variable in the new remote extension host. This is used to auth for SSH using the local machine's SSH agent.
One way to do this is to give the ResolvedAuthority type the remote environment variables that should be set on the remote EH. Example:
export class ResolvedAuthority {
readonly host: string;
readonly port: number;
readonly remoteEnv?: { [key: string]: string };
constructor(host: string, port: number, remoteEnv?: { [key: string]: string });
}If that isn't really the right place for it we could change the resolver interface to return a ResolvedAuthority and a separate set of options for the remote EH.
export interface IResolverResult {
authority: ResolvedAuthority;
options: IResolveOptions;
}
export interface IResolveOptions {
remoteEnv?: { [key: string]: string };
}This is also used for reconnection so we would need to implement this for the initial EH creation and also for reconnecting to a running EH. For agent forwarding, both would be necessary. When we reconnect and open a new tunnel, we will get a new SSH_AUTH_SOCK and we would need to patch this in the EH.