From 9056c5305480fccdbfe4bfe9301203dda559fe26 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 25 Apr 2022 13:59:18 -0500 Subject: [PATCH] fix: Disable known hosts checking for config-ssh (#1150) This was causing the remote identity changed message. We don't need to verify remote hosts because we already auth via our API. --- cli/configssh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/configssh.go b/cli/configssh.go index 46d50283eb..36a750af2b 100644 --- a/cli/configssh.go +++ b/cli/configssh.go @@ -99,6 +99,9 @@ func configSSH() *cobra.Command { "\tHostName coder."+hostname, "\tConnectTimeout=0", "\tStrictHostKeyChecking=no", + // Without this, the "REMOTE HOST IDENTITY CHANGED" + // message will appear. + "\tUserKnownHostsFile=/dev/null", ) if !skipProxyCommand { configOptions = append(configOptions, fmt.Sprintf("\tProxyCommand %q --global-config %q ssh --stdio %s", binaryFile, root, hostname))