function _request_forwarding($ssh)
    {
        $request_channel = $ssh->_get_open_channel();
        if ($request_channel === false) {
            return false;
        }

        $packet = pack(
            'CNNa*C',
            NET_SSH2_MSG_CHANNEL_REQUEST,
            $ssh->server_channels[$request_channel],
            strlen('auth-agent-req@openssh.com'),
            'auth-agent-req@openssh.com',
            1
        );

        $ssh->channel_status[$request_channel] = NET_SSH2_MSG_CHANNEL_REQUEST;

        if (!$ssh->_send_binary_packet($packet)) {
            return false;
        }

        $response = $ssh->_get_channel_packet($request_channel);
        if ($response === false) {
            return false;
        }

        $ssh->channel_status[$request_channel] = NET_SSH2_MSG_CHANNEL_OPEN;
        $this->forward_status = self::FORWARD_ACTIVE;

        return true;
    }
function _request_forwarding($ssh)
    {
        $request_channel = $ssh->_get_open_channel();
        if ($request_channel === false) {
            return false;
        }

        $packet = pack(
            'CNNa*C',
            NET_SSH2_MSG_CHANNEL_REQUEST,
            $ssh->server_channels[$request_channel],
            strlen('auth-agent-req@openssh.com'),
            'auth-agent-req@openssh.com',
            1
        );

        $ssh->channel_status[$request_channel] = NET_SSH2_MSG_CHANNEL_REQUEST;

        if (!$ssh->_send_binary_packet($packet)) {
            return false;
        }

        $response = $ssh->_get_channel_packet($request_channel);
        if ($response === false) {
            return false;
        }

        $ssh->channel_status[$request_channel] = NET_SSH2_MSG_CHANNEL_OPEN;
        $this->forward_status = self::FORWARD_ACTIVE;

        return true;
    }
function _request_forwarding ( $ ssh ) { $ request_channel = $ ssh -> _get_open_channel ( ) ; if ( $ request_channel === false ) { return false ; } $ packet = pack ( 'CNNa*C' , NET_SSH2_MSG_CHANNEL_REQUEST , $ ssh -> server_channels [ $ request_channel ] , strlen ( 'auth-agent-req@openssh.com' ) , 'auth-agent-req@openssh.com' , 1 ) ; $ ssh -> channel_status [ $ request_channel ] = NET_SSH2_MSG_CHANNEL_REQUEST ; if ( ! $ ssh -> _send_binary_packet ( $ packet ) ) { return false ; } $ response = $ ssh -> _get_channel_packet ( $ request_channel ) ; if ( $ response === false ) { return false ; } $ ssh -> channel_status [ $ request_channel ] = NET_SSH2_MSG_CHANNEL_OPEN ; $ this -> forward_status = self :: FORWARD_ACTIVE ; return true ; }
Request agent forwarding of remote server

@param Net_SSH2 $ssh
@return bool
@access private
Request agent forwarding of remote server