From: elijah Date: Thu, 1 Nov 2012 22:47:19 +0000 (-0700) Subject: fixed bug with compiling authorized_keys X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f0e8ae8b25e4fdbb0420756e1dada3d329d6a13d;p=leap%2Fleap_cli.git fixed bug with compiling authorized_keys --- 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