From f0e8ae8b25e4fdbb0420756e1dada3d329d6a13d Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 1 Nov 2012 15:47:19 -0700 Subject: fixed bug with compiling authorized_keys --- lib/leap_cli/commands/user.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/leap_cli/commands/user.rb b/lib/leap_cli/commands/user.rb index 5f1b2d9..fbc366a 100644 --- a/lib/leap_cli/commands/user.rb +++ b/lib/leap_cli/commands/user.rb @@ -120,7 +120,13 @@ module LeapCli def update_authorized_keys buffer = StringIO.new Dir.glob(path([:user_ssh, '*'])).each do |keyfile| - buffer << File.read(keyfile) + ssh_type, ssh_key = File.read(keyfile).strip.split(" ") + buffer << ssh_type + buffer << " " + buffer << ssh_key + buffer << " " + buffer << relative_path(keyfile) + buffer << "\n" end write_file!(:authorized_keys, buffer.string) end -- cgit v1.2.3