function _ssh_agent_login($username, $agent)
    {
        $this->agent = $agent;
        $keys = $agent->requestIdentities();
        foreach ($keys as $key) {
            if ($this->_privatekey_login($username, $key)) {
                return true;
            }
        }

        return false;
    }
function _ssh_agent_login($username, $agent)
    {
        $this->agent = $agent;
        $keys = $agent->requestIdentities();
        foreach ($keys as $key) {
            if ($this->_privatekey_login($username, $key)) {
                return true;
            }
        }

        return false;
    }
function _ssh_agent_login ( $ username , $ agent ) { $ this -> agent = $ agent ; $ keys = $ agent -> requestIdentities ( ) ; foreach ( $ keys as $ key ) { if ( $ this -> _privatekey_login ( $ username , $ key ) ) { return true ; } } return false ; }
Login with an ssh-agent provided key

@param string $username
@param \phpseclib\System\SSH\Agent $agent
@return bool
@access private
Login with an ssh - agent provided key