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_connectssh2_exec>
^SSH2 FunctionsLast updated: Mon, 26 Oct 2026

ssh2_disconnect

(PECL ssh2 >= 1.0)

ssh2_disconnect — Close a connection to a remote SSH server

Description

function ssh2_disconnect(resource $session): bool

Close a connection to a remote SSH server.

Parameters

session

An SSH connection link identifier, obtained from a call to ssh2_connect().

Return Values

Returns true on success or false on failure.

See Also


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