Skip to content

Commit

Permalink
Workaround scp behaviour in OpenSSH 9.0
Browse files Browse the repository at this point in the history
scp in OpenSSH 9 now uses SFTP by default, which breaks the Packer /
Ansible / SSH Proxy interaction

See hashicorp/packer-plugin-ansible#100
And hashicorp/packer#11783

Adding the `-O` flag to  the `scp` command forces the old protocol to be
used.
  • Loading branch information
yankcrime committed Jul 14, 2022
1 parent 1160bf2 commit 81fa794
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions images/capi/packer/qemu/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} -o IdentitiesOnly=yes'"
],
"extra_arguments": [
"--scp-extra-args", "'-O'",
"--extra-vars",
"{{user `ansible_common_vars`}}",
"--extra-vars",
Expand All @@ -79,6 +80,7 @@
"ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} -o IdentitiesOnly=yes'"
],
"extra_arguments": [
"--scp-extra-args", "'-O'",
"--extra-vars",
"{{user `ansible_common_vars`}}",
"--extra-vars",
Expand Down

0 comments on commit 81fa794

Please sign in to comment.