Apply new line before shell to system
Having looked at the code again this seems like a more straightforward way of fixing the bug.
This commit is contained in:
parent
f7f46ba47d
commit
2720ed3d2c
|
@ -4,7 +4,7 @@ module VagrantPlugins
|
|||
class InsertPublicKey
|
||||
def self.insert_public_key(machine, contents)
|
||||
comm = machine.communicate
|
||||
contents = contents.chomp
|
||||
contents = contents.chomp+"\n"
|
||||
|
||||
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
||||
Tempfile.open("vagrant-linux-insert-public-key") do |f|
|
||||
|
@ -19,7 +19,6 @@ module VagrantPlugins
|
|||
mkdir -p ~/.ssh
|
||||
chmod 0700 ~/.ssh
|
||||
cat '#{remote_path}' >> ~/.ssh/authorized_keys
|
||||
echo "\n" >> ~/.ssh/authorized_keys
|
||||
chmod 0600 ~/.ssh/authorized_keys
|
||||
|
||||
# Remove the temporary file
|
||||
|
|
Loading…
Reference in New Issue