diff options
-rw-r--r-- | lib/leap_cli/commands/user.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |