Skip to content

Commit 82f5615

Browse files
authored
Set IdentitiesOnly option when configuring ssh (coder#237)
This setting will prevent ssh from using identities found in ssh-agent. We're already specifying the identity file, so there's no need to rely on ssh-agent for this. This will prevent 'too many authentication failures' errors when connecting to an environment while having a lot of identities loaded in the agent.
1 parent 63f6ec3 commit 82f5615

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/cmd/configssh.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func makeSSHConfig(host, userName, envName, privateKeyFilepath string) string {
203203
User %s-%s
204204
StrictHostKeyChecking no
205205
ConnectTimeout=0
206+
IdentitiesOnly yes
206207
IdentityFile="%s"
207208
ServerAliveInterval 60
208209
ServerAliveCountMax 3

0 commit comments

Comments
 (0)