Sha256: ce886f659f60390422bb9bf70e41778ece77961252fffff7a0ac4b280c60877d

Contents?: true

Size: 310 Bytes

Versions: 40

Compression:

Stored size: 310 Bytes

Contents

require "shelly/ssh_key"

module Shelly
  class SshKeys
    def initialize
      @rsa = SshKey.new('~/.ssh/id_rsa.pub')
      @dsa = SshKey.new('~/.ssh/id_dsa.pub')
    end

    def destroy
      [@rsa, @dsa].map(&:destroy).any?
    end

    def prefered_key
      @dsa.exists? ? @dsa : @rsa
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
shelly-0.4.30 lib/shelly/ssh_keys.rb
shelly-0.4.29 lib/shelly/ssh_keys.rb
shelly-0.4.29.pre lib/shelly/ssh_keys.rb
shelly-0.4.28 lib/shelly/ssh_keys.rb
shelly-0.4.28.pre2 lib/shelly/ssh_keys.rb
shelly-0.4.28.pre lib/shelly/ssh_keys.rb
shelly-0.4.27 lib/shelly/ssh_keys.rb
shelly-0.4.26 lib/shelly/ssh_keys.rb
shelly-0.4.26.pre lib/shelly/ssh_keys.rb
shelly-0.4.25 lib/shelly/ssh_keys.rb
shelly-0.4.24 lib/shelly/ssh_keys.rb
shelly-0.4.23 lib/shelly/ssh_keys.rb
shelly-0.4.23.pre lib/shelly/ssh_keys.rb
shelly-0.4.22 lib/shelly/ssh_keys.rb
shelly-0.4.21 lib/shelly/ssh_keys.rb
shelly-0.4.19 lib/shelly/ssh_keys.rb
shelly-0.4.18 lib/shelly/ssh_keys.rb
shelly-0.4.17 lib/shelly/ssh_keys.rb
shelly-0.4.16 lib/shelly/ssh_keys.rb
shelly-0.4.15 lib/shelly/ssh_keys.rb