Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ssh2_forward_acceptssh2_keepalive_config>
^SSH2 FunctionsLast updated: Mon, 26 Oct 2026

ssh2_forward_listen

(PECL ssh2 >= 0.9.0)

ssh2_forward_listen — Bind a port on the remote server and listen for connections

Description

function ssh2_forward_listen(
    resource $session,
    int $port,
    string $host = ?,
    int $max_connections = 16
): resource|false

Binds a port on the remote server and listen for connections.

Warning

This function is currently not documented; only its argument list is available.

Parameters

session

An SSH Session resource, obtained from a call to ssh2_connect().

port

The port of the remote server.

host

max_connections

Return Values

Returns an SSH2 Listener, or false on failure.

See Also


<ssh2_forward_acceptssh2_keepalive_config>
^SSH2 FunctionsLast updated: Mon, 26 Oct 2026