Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/remote/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { WorkspaceMonitor } from "../workspace/workspaceMonitor";

import {
SshConfig,
type SSHValues,
type SshValues,
mergeSshConfigValues,
parseCoderSshOptions,
parseSshConfig,
Expand Down Expand Up @@ -801,13 +801,15 @@ export class Remote {
cliAuth,
);

const sshValues: SSHValues = {
const sshValues: SshValues = {
Host: hostPrefix + `*`,
ProxyCommand: proxyCommand,
ConnectTimeout: "0",
StrictHostKeyChecking: "no",
UserKnownHostsFile: "/dev/null",
LogLevel: "ERROR",
ServerAliveInterval: "10",
ServerAliveCountMax: "3",
};
if (sshSupportsSetEnv()) {
// This allows for tracking the number of extension
Expand All @@ -824,7 +826,7 @@ export class Remote {
hostName,
sshConfig.getRaw(),
);
const keysToMatch: Array<keyof SSHValues> = [
const keysToMatch: Array<keyof SshValues> = [
"ProxyCommand",
"UserKnownHostsFile",
"StrictHostKeyChecking",
Expand Down
8 changes: 5 additions & 3 deletions src/remote/sshConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ interface Block {
raw: string;
}

export interface SSHValues {
export interface SshValues {
Host: string;
ProxyCommand: string;
ConnectTimeout: string;
StrictHostKeyChecking: string;
UserKnownHostsFile: string;
LogLevel: string;
ServerAliveInterval: string;
ServerAliveCountMax: string;
SetEnv?: string;
}

Expand Down Expand Up @@ -219,7 +221,7 @@ export class SshConfig {
*/
async update(
safeHostname: string,
values: SSHValues,
values: SshValues,
overrides?: Record<string, string>,
) {
const block = this.getBlock(safeHostname);
Expand Down Expand Up @@ -298,7 +300,7 @@ export class SshConfig {
*/
private buildBlock(
safeHostname: string,
values: SSHValues,
values: SshValues,
overrides?: Record<string, string>,
) {
const { Host, ...otherValues } = values;
Expand Down
Loading