Merge pull request #6575 from legal90/fix-pubkey-perms

linux/cap/remove_public_key: Fix permissions on "~/.ssh/authorized_keys"
This commit is contained in:
Seth Vargo 2015-11-23 10:06:25 -05:00
commit c7f00be42c
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ module VagrantPlugins
comm.execute(<<SCRIPT)
sed -e '/^.*#{contents}.*$/d' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.new
mv ~/.ssh/authorized_keys.new ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
SCRIPT
end
end