Commit Graph

7 Commits

Author SHA1 Message Date
Jonathan d1be7ae84a Better method for string concatenation
Never developed in Ruby before. I have only just discovered that apparently `<<` is a better method of string concatenation.
2016-06-16 11:59:11 +01:00
Jonathan 2720ed3d2c Apply new line before shell to system
Having looked at the code again this seems like a more straightforward way of fixing the bug.
2016-06-16 11:47:47 +01:00
Jonathan f7f46ba47d 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.
2016-06-15 23:56:22 +01:00
Seth Vargo e2b7e28082
guests/linux: Update insert_public_key cap to be one command 2016-06-06 11:58:32 -04:00
Mitchell Hashimoto e909b91bfd guests/linux: public key insertion is more robust
contents can have newlines (or not)
2014-02-12 22:11:33 -08:00
Mitchell Hashimoto 732a03c1c4 guests/linux: properly quote and insert public key 2014-01-08 15:12:26 -08:00
Mitchell Hashimoto b3a9e6a088 insert_public_key cap, and use that if it exists 2014-01-03 11:13:21 -08:00