PECL ssh2 >= 0.10
ssh2_publickey_list - List currently authorized publickeys
Code Examples

ssh2_publickey_list( resource$pkey ): array

List currently authorized publickeys.



Publickey Subsystem resource

Return Values

Returns a numerically indexed array of keys, each of which is an associative array containing: name, blob, and attrs elements.

Publickey elements
Array Key Meaning
name Name of algorithm used by this publickey, for example: ssh-dss or ssh-rsa.
blob Publickey blob as raw binary data.
attrs Attributes assigned to this publickey. The most common attribute, and the only one supported by publickey version 1 servers, is comment, which may be any freeform string.



The public key subsystem is used for managing public keys on a server to which the client is already authenticated. To authenticate to a remote system using public key authentication, use the ssh2_auth_pubkey_file function instead.

Related Functions

Example of ssh2_publickey_list

Show all examples for ssh2_publickey_list

PHP Version: