diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index 03dfefe4f..e806433cc 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -113,6 +113,7 @@ module Vagrant @logger.info("Attempting to correct key permissions to 0600") File.chmod(0600, key_path) + stat = File.stat(key_path) if Util::FileMode.from_octal(stat.mode) != "600" raise Errors::SSHKeyBadPermissions, :key_path => key_path end