PHP Class phpseclib\System\SSH\Agent

requestIdentities() method pumps out \phpseclib\System\SSH\Agent\Identity objects
Author: Jim Wigginton ([email protected])
Datei anzeigen Open project: phpseclib/phpseclib Class Usage Examples

Public Properties

Property Type Description
$expected_bytes Tracking the number of bytes we are expecting to arrive for the agent socket on the SSH data channel
$forward_status Agent forwarding status
$fsock resource Socket Resource
$socket_buffer Buffer for accumulating forwarded authentication agent data arriving on SSH data channel destined for agent unix socket

Public Methods

Method Description
__construct ( ) : Agent Default Constructor
_forward_data ( string $data ) : data Forward data to SSH Agent and return data reply
_on_channel_open ( Net_SSH2 $ssh ) On successful channel open
_request_forwarding ( Net_SSH2 $ssh ) : boolean Request agent forwarding of remote server
requestIdentities ( ) : array Request Identities
startSSHForwarding ( Net_SSH2 $ssh ) : boolean Signal that agent forwarding should be requested when a channel is opened

Method Details

__construct() public method

Default Constructor
public __construct ( ) : Agent
return Agent

_forward_data() public method

Forward data to SSH Agent and return data reply
public _forward_data ( string $data ) : data
$data string
return data from SSH Agent

_on_channel_open() public method

This method is called upon successful channel open to give the SSH Agent an opportunity to take further action. i.e. request agent forwarding
public _on_channel_open ( Net_SSH2 $ssh )
$ssh Net_SSH2

_request_forwarding() public method

Request agent forwarding of remote server
public _request_forwarding ( Net_SSH2 $ssh ) : boolean
$ssh Net_SSH2
return boolean

requestIdentities() public method

See "2.5.2 Requesting a list of protocol 2 keys" Returns an array containing zero or more \phpseclib\System\SSH\Agent\Identity objects
public requestIdentities ( ) : array
return array

startSSHForwarding() public method

Signal that agent forwarding should be requested when a channel is opened
public startSSHForwarding ( Net_SSH2 $ssh ) : boolean
$ssh Net_SSH2
return boolean

Property Details

$expected_bytes public_oe property

Tracking the number of bytes we are expecting to arrive for the agent socket on the SSH data channel
public $expected_bytes

$forward_status public_oe property

Agent forwarding status
public $forward_status

$fsock public_oe property

Socket Resource
public resource $fsock
return resource

$socket_buffer public_oe property

Buffer for accumulating forwarded authentication agent data arriving on SSH data channel destined for agent unix socket
public $socket_buffer