Skip to content

Commit

Permalink
feat: add GitHub host key to known hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Sep 10, 2024
1 parent b5ffc25 commit d0aebd2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
8 changes: 7 additions & 1 deletion orka/templates/macos-13-arm-release.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ build {
"chmod 600 /Users/${var.ssh_default_username}/.ssh/authorized_keys"
]
}

// Add GitHub host key to known hosts.
provisioner "shell" {
inline = [
"echo 'Adding GitHub host key to known hosts...'",
"ssh-keyscan github.com >> /Users/${var.ssh_default_username}/.ssh/known_hosts"
]
}
// Disable SSH password authentication.
// @TODO: Review fallback to password authentication.
provisioner "shell" {
Expand Down
8 changes: 7 additions & 1 deletion orka/templates/macos-13-arm-test.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ build {
"chmod 600 /Users/${var.ssh_default_username}/.ssh/authorized_keys"
]
}

// Add GitHub host key to known hosts.
provisioner "shell" {
inline = [
"echo 'Adding GitHub host key to known hosts...'",
"ssh-keyscan github.com >> /Users/${var.ssh_default_username}/.ssh/known_hosts"
]
}
// Disable SSH password authentication.
// @TODO: Review fallback to password authentication.
provisioner "shell" {
Expand Down
8 changes: 7 additions & 1 deletion orka/templates/macos-13-intel-release.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ build {
"chmod 600 /Users/${var.ssh_default_username}/.ssh/authorized_keys"
]
}

// Add GitHub host key to known hosts.
provisioner "shell" {
inline = [
"echo 'Adding GitHub host key to known hosts...'",
"ssh-keyscan github.com >> /Users/${var.ssh_default_username}/.ssh/known_hosts"
]
}
// Disable SSH password authentication.
// @TODO: Review fallback to password authentication.
provisioner "shell" {
Expand Down
10 changes: 8 additions & 2 deletions orka/templates/macos-13-intel-test.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ build {
"chmod 700 /Users/${var.ssh_default_username}/.ssh",
"chmod 600 /Users/${var.ssh_default_username}/.ssh/authorized_keys"
]
}

}
// Add GitHub host key to known hosts.
provisioner "shell" {
inline = [
"echo 'Adding GitHub host key to known hosts...'",
"ssh-keyscan github.com >> /Users/${var.ssh_default_username}/.ssh/known_hosts"
]
}
// Disable SSH password authentication.
// @TODO: Review fallback to password authentication.
provisioner "shell" {
Expand Down

0 comments on commit d0aebd2

Please sign in to comment.