ssh2_fingerprint

(PECL ssh2 >= 0.9.0) Retrieve fingerprint of remote server string ssh2_fingerprint ( resource $session [, int $flags = SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX ] ) Returns a server hostkey hash from an active session. Parameters: session An SSH connection link identifier, obtained from a call to ssh2_connect(). flags flags may be

ssh2_fetch_stream

(PECL ssh2 >= 0.9.0) Fetch an extended data stream resource ssh2_fetch_stream ( resource $channel, int $streamid ) Fetches an alternate substream associated with an SSH2 channel stream. The SSH2 protocol currently defines only one substream, STDERR, which has a substream ID of SSH2_STREAM_STDERR (defined as 1). Parameters: channel Fetches an alternate substream associa

ssh2_exec

(PECL ssh2 >= 0.9.0) Execute a command on a remote server resource ssh2_exec ( resource $session, string $command [, string $pty [, array $env [, int $width = 80 [, int $height = 25 [, int $width_height_type = SSH2_TERM_UNIT_CHARS ]]]]] ) Execute a command at the remote end and allocate a channel for it. Parameters: session An SSH connection link identifier, obtaine

ssh2_connect

(PECL ssh2 >= 0.9.0) Connect to an SSH server resource ssh2_connect ( string $host [, int $port = 22 [, array $methods [, array $callbacks ]]] ) Establish a connection to a remote SSH server. Once connected, the client should verify the server's hostkey using ssh2_fingerprint(), then authenticate using either password or public key. Parameters: host Establish a conn

ssh2_auth_pubkey_file

(PECL ssh2 >= 0.9.0) Authenticate using a public key bool ssh2_auth_pubkey_file ( resource $session, string $username, string $pubkeyfile, string $privkeyfile [, string $passphrase ] ) Authenticate using a public key read from a file. Parameters: session An SSH connection link identifier, obtained from a call to ssh2_connect(). username

ssh2_auth_password

(PECL ssh2 >= 0.9.0) Authenticate over SSH using a plain password bool ssh2_auth_password ( resource $session, string $username, string $password ) Authenticate over SSH using a plain password. Since version 0.12 this function also supports keyboard_interactive method. Parameters: session An SSH connection link identifier, obtained from a call to ssh2_connect().

ssh2_auth_none

(PECL ssh2 >= 0.9.0) Authenticate as "none" mixed ssh2_auth_none ( resource $session, string $username ) Attempt "none" authentication which usually will (and should) fail. As part of the failure, this function will return an array of accepted authentication methods. Parameters: session An SSH connection link identifier, obtained from a call to ssh2_connect().

ssh2_auth_hostbased_file

(PECL ssh2 >= 0.9.0) Authenticate using a public hostkey bool ssh2_auth_hostbased_file ( resource $session, string $username, string $hostname, string $pubkeyfile, string $privkeyfile [, string $passphrase [, string $local_username ]] ) Authenticate using a public hostkey read from a file. Parameters: session An SSH connection link identifier, obtained from a call to s

ssh2_auth_agent

(PECL ssh2 >= 0.12) Authenticate over SSH using the ssh agent bool ssh2_auth_agent ( resource $session, string $username ) Authenticate over SSH using the ssh agent Note: The ssh2_auth_agent() function will only be available when the ssh2 extension is compiled with libssh >= 1.2.3. Parameters: session An SSH connection link identifier, obtained from a call to ssh

socket_write

(PHP 4 >= 4.1.0, PHP 5, PHP 7) Write to a socket int socket_write ( resource $socket, string $buffer [, int $length ] ) The function socket_write() writes to the socket from the given buffer. Parameters: socket The function socket_write() writes to the socket from the given buffer. buffer The buffer to be written.