phpseclib API Documentation
Class

System_SSH_Agent

class System_SSH_Agent

Pure-PHP ssh-agent client identity factory

requestIdentities() method pumps out SystemSSHAgent_Identity objects

Properties

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

Methods

System_SSH_Agent __construct($address = null)

Default Constructor

System_SSH_Agent($address = null)

PHP4 compatible Default Constructor.

array requestIdentities()

Request Identities

bool startSSHForwarding(Net_SSH2 $ssh)

Signal that agent forwarding should be requested when a channel is opened

bool _request_forwarding(Net_SSH2 $ssh)

Request agent forwarding of remote server

_on_channel_open(Net_SSH2 $ssh)

On successful channel open

data _forward_data(string $data)

Forward data to SSH Agent and return data reply

Details

at line 355
public System_SSH_Agent __construct($address = null)

Default Constructor

Parameters

$address

Return Value

System_SSH_Agent

at line 383
public System_SSH_Agent($address = null)

PHP4 compatible Default Constructor.

Parameters

$address

See also

self::__construct()

at line 397
public array requestIdentities()

Request Identities

See "2.5.2 Requesting a list of protocol 2 keys" Returns an array containing zero or more SystemSSHAgent_Identity objects

Return Value

array

at line 461
public bool startSSHForwarding(Net_SSH2 $ssh)

Signal that agent forwarding should be requested when a channel is opened

Parameters

Net_SSH2 $ssh

Return Value

bool

at line 475
public bool _request_forwarding(Net_SSH2 $ssh)

Request agent forwarding of remote server

Parameters

Net_SSH2 $ssh

Return Value

bool

at line 518
public _on_channel_open(Net_SSH2 $ssh)

On successful channel open

This method is called upon successful channel open to give the SSH Agent an opportunity to take further action. i.e. request agent forwarding

Parameters

Net_SSH2 $ssh

at line 532
public data _forward_data(string $data)

Forward data to SSH Agent and return data reply

Parameters

string $data

Return Value

data from SSH Agent