each_identity (Net::SSH::Authentication::KeyManager)

         # File lib/net/ssh/authentication/key_manager.rb, line 93
     93:         def each_identity
     94:           if agent
     95:             agent.identities.each do |key|
     96:               known_identities[key] = { :from => :agent }
     97:               yield key
     98:             end
     99:           end
    100:
    101:           key_files.each do |file|
    102:             public_key_file = file + ".pub"
    103:             if File.readable?(public_key_file)
    104:               begin
    105:                 key = KeyFactory.load_public_key(public_key_file)
    106:                 known_identities[key] = { :from => :file, :file => file }
    107:                 yield key
    108:               rescue Exception => e
    109:                 error { "could not load public key file `#{public_key_file}': #{e.class} (#{e.message})" }
    110:               end
    111:             elsif File.readable?(file)
    112:               begin
    113:                 private_key = KeyFactory.load_private_key(file, options[:passphrase])
    114:                 key = private_key.send(:public_key)
    115:                 known_identities[key] = { :from => :file, :file => file, :key => private_key }
    116:                 yield key
    117:               rescue Exception => e
    118:                 error { "could not load private key file `#{file}': #{e.class} (#{e.message})" }
    119:               end
    120:             end
    121:           end
    122:
    123:           key_data.each do |data|
    124:             private_key = KeyFactory.load_data_private_key(data)
    125:             key = private_key.send(:public_key)
    126:             known_identities[key] = { :from => :key_data, :data => data, :key => private_key }
    127:             yield key
    128:           end
    129:
    130:           self
    131:         end