bin/rye in rye-0.4.3 vs bin/rye in rye-0.5.1

- old
+ new

@@ -41,18 +41,29 @@ opts = { :debug => nil, :auth_methods => %w(publickey hostbased) } opts[:user] = obj.option.user if obj.option.user obj.argv.each do |hostname| - rbox = Rye::Box.new(hostname, opts).connect puts "Authorizing #{rbox.opts[:user]}@#{hostname}" + rbox = Rye::Box.new(hostname, opts).connect puts "Added public keys for: ", rbox.authorize_keys puts "Now try: " << "ssh #{rbox.opts[:user]}@#{hostname}" end end command_alias :authorize, :authorise + +desc "Add your public keys to your current account on this machine" +command :authorize_local do |obj| + user = Rye.sysinfo.user + puts "Authorizing #{user}@localhost" + rbox = Rye::Box.new('localhost').connect + puts "Added public keys for: ", rbox.authorize_keys_local + puts "Now try: " << "ssh #{user}@localhost" + +end +command_alias :local_authorize, :local_authorise desc "Generate a public key from a private key"