Skip to content

fix: Disable known hosts checking for config-ssh #1150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2022
Merged
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
fix: Disable known hosts checking for config-ssh
This was causing the remote identity changed message.
We don't need to verify remote hosts because we
already auth via our API.
  • Loading branch information
kylecarbs committed Apr 25, 2022
commit ecc8588ade1047c416fcd44caee1084313fd587a
3 changes: 3 additions & 0 deletions cli/configssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down