]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
node init - privilege rsa keys over ecdsa-sha2-nistp256 keys, because screw nist...
authorelijah <elijah@riseup.net>
Tue, 4 Nov 2014 23:40:27 +0000 (15:40 -0800)
committerelijah <elijah@riseup.net>
Tue, 4 Nov 2014 23:40:27 +0000 (15:40 -0800)
lib/leap_cli/commands/node.rb

index f1e1cf8ac80cb354b6bfbe0c7d1c766b9ec5db72..190d348297491c3bb3628c585598c2f3d8e01f53 100644 (file)
@@ -196,7 +196,7 @@ module LeapCli; module Commands
   # get the public host key for a host.
   # return SshKey object representation of the key.
   #
-  # Only supports ecdsa or rsa host keys. ecdsa is preferred if both are available.
+  # Only supports ecdsa or rsa host keys. rsa is preferred if both are available.
   #
   def get_public_key_for_ip(address, port=22)
     assert_bin!('ssh-keyscan')
@@ -223,7 +223,7 @@ module LeapCli; module Commands
     if rsa_key.nil? && ecdsa_key.nil?
       bail! "ssh-keyscan got zero host keys back! Output was: #{output}"
     else
-      key = ecdsa_key || rsa_key
+      key = rsa_key || ecdsa_key
       return SshKey.load(key[2], key[1])
     end
   end