Append newline to each key added

The change to this file 10 days ago removed a newline character at the end of each key added to it. This mean that when another key was added, it continued on the same line as the one before and thus wasn't being detected when an ssh connection came in with a key file.

With regards to https://github.com/mitchellh/vagrant/issues/7455 this is an (ugly) fix.

I'm sure someone knows a better command to concat a file and a string and append it to the `authorized_keys` file. But this does fix the problem.
This commit is contained in:
Jonathan 2016-06-15 23:56:22 +01:00 committed by GitHub
parent e65f61605d
commit f7f46ba47d
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ 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