# File lib/net/ssh/userauth/userkeys.rb, line 123
        def identities
          identities = []
          @known_identities = Hash.new

          ensure_agent
          if @agent
            @agent.identities.each do |key|
              identities.push key
              @known_identities[ key ] = { :from => :agent }
            end
          end

          @key_files.each do |file|
            if @key_existence_tester.readable?( file )
              begin
                key = @keys.load_public_key( file + ".pub" )
                identities.push key
                @known_identities[ key ] = { :from => :file, :file => file }
              rescue Exception => e
                @log.warn "could not load public key file " +
                  "'#{file}.pub' (#{e.message} [#{e.class}])" if @log.warn?
              end
            end
          end

          identities
        end