Skip to content

Commit

Permalink
synced_folders/rsync: add UserKnownHostsFile to /dev/null [GH-3511]
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Apr 22, 2014
1 parent 7cbef9b commit a47b85c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -53,6 +53,7 @@ BUG FIXES:

- synced\_folders/nfs: Acquires a process-level lock so exports don't
collide with Vagrant running in parallel.
- synced\_folders/rsync: Add UserKnownHostsFile option to not complain. [GH-3511]

PLUGIN AUTHOR CHANGES:

Expand Down
4 changes: 3 additions & 1 deletion plugins/synced_folders/rsync/helper.rb
Expand Up @@ -57,7 +57,9 @@ def self.rsync_single(machine, ssh_info, opts)
username = ssh_info[:username]
host = ssh_info[:host]
rsh = [
"ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no",
"ssh -p #{ssh_info[:port]} " +
"-o StrictHostKeyChecking=no " +
"-o UserKnownHostsFile=/dev/null",
ssh_info[:private_key_path].map { |p| "-i '#{p}'" },
].flatten.join(" ")

Expand Down

0 comments on commit a47b85c

Please sign in to comment.