aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-01 15:47:19 -0700
committerelijah <elijah@riseup.net>2012-11-01 15:47:19 -0700
commitf0e8ae8b25e4fdbb0420756e1dada3d329d6a13d (patch)
tree7c32fae4b2778a45643fc5a335a2b00d686118d3
parent550234ca30a62fd16bc525a6099486c2371a1893 (diff)
downloadleap_cli-f0e8ae8b25e4fdbb0420756e1dada3d329d6a13d.tar.gz
leap_cli-f0e8ae8b25e4fdbb0420756e1dada3d329d6a13d.tar.bz2
fixed bug with compiling authorized_keys
-rw-r--r--lib/leap_cli/commands/user.rb8
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