Query: ssh2_auth_agent
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SSH2_AUTH_AGENT(3) 1 SSH2_AUTH_AGENT(3) ssh2_auth_agent - Authenticate over SSH using the ssh agentSYNOPSISbool ssh2_auth_agent (resource $session, string $username)DESCRIPTIONAuthenticate over SSH using the ssh agent Note The ssh2_auth_agent(3) function will only be available when the ssh2 extension is compiled with libssh >= 1.2.3.PARAMETERSo $session - An SSH connection link identifier, obtained from a call to ssh2_connect(3). o $username - Remote user name.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 Authenticating with a ssh agent <?php $connection = ssh2_connect('shell.example.com', 22); if (ssh2_auth_agent($connection, 'username')) { echo "Authentication Successful! "; } else { die('Authentication Failed...'); } ?> PHP Documentation Group SSH2_AUTH_AGENT(3)