Skip to content

Commit

Permalink
Add "IdentitiesOnly" SSH option to fix running tests when known_hosts…
Browse files Browse the repository at this point in the history
… has multiple records

Signed-off-by: Yevhen Vydolob <[email protected]>
  • Loading branch information
evidolob committed Aug 1, 2024
1 parent 2b36bdd commit b1f1455
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func scp(src, dst string) error {
sshCmd := exec.Command("scp",
"-o", "UserKnownHostsFile=/dev/null",
"-o", "StrictHostKeyChecking=no",
"-o", "IdentitiesOnly=yes",
"-i", privateKeyFile,
"-P", strconv.Itoa(sshPort),
src,
Expand All @@ -223,6 +224,7 @@ func sshCommand(cmd ...string) *exec.Cmd {
sshCmd := exec.Command("ssh",
"-o", "UserKnownHostsFile=/dev/null",
"-o", "StrictHostKeyChecking=no",
"-o", "IdentitiesOnly=yes",
"-i", privateKeyFile,
"-p", strconv.Itoa(sshPort),
fmt.Sprintf("%[email protected]", ignitionUser), "--", strings.Join(cmd, " ")) // #nosec G204
Expand Down

0 comments on commit b1f1455

Please sign in to comment.