Skip to content

Commit

Permalink
Merge pull request #13329 from chrisroberts/key-line-endings
Browse files Browse the repository at this point in the history
Open private key file in binary mode when writing
  • Loading branch information
chrisroberts authored Jan 13, 2024
2 parents 8809fb6 + 0a8f99d commit 2b7a200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/communicators/ssh/communicator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def ready?

# Write out the private key in the data dir so that the
# machine automatically picks it up.
@machine.data_dir.join("private_key").open("w+") do |f|
@machine.data_dir.join("private_key").open("wb+") do |f|
f.write(priv)
end

Expand Down

0 comments on commit 2b7a200

Please sign in to comment.