\phpseclib\System\SSHAgent

Pure-PHP ssh-agent client identity factory

requestIdentities() method pumps out \phpseclib\System\SSH\Agent\Identity objects

Summary

Methods
Properties
Constants
__construct()
requestIdentities()
startSSHForwarding()
_request_forwarding()
_on_channel_open()
_forward_data()
$fsock
$forward_status
$socket_buffer
$expected_bytes
SSH_AGENTC_REQUEST_IDENTITIES
SSH_AGENT_IDENTITIES_ANSWER
SSH_AGENTC_SIGN_REQUEST
SSH_AGENT_SIGN_RESPONSE
FORWARD_NONE
FORWARD_REQUEST
FORWARD_ACTIVE
SSH_AGENT_FAILURE
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SSH_AGENTC_REQUEST_IDENTITIES

SSH_AGENTC_REQUEST_IDENTITIES

SSH_AGENT_IDENTITIES_ANSWER

SSH_AGENT_IDENTITIES_ANSWER

SSH_AGENTC_SIGN_REQUEST

SSH_AGENTC_SIGN_REQUEST

SSH_AGENT_SIGN_RESPONSE

SSH_AGENT_SIGN_RESPONSE

FORWARD_NONE

FORWARD_NONE

FORWARD_REQUEST

FORWARD_REQUEST

FORWARD_ACTIVE

FORWARD_ACTIVE

SSH_AGENT_FAILURE

SSH_AGENT_FAILURE

Unused

Properties

$fsock

$fsock : resource

Socket Resource

Type

resource

$forward_status

$forward_status : 

Agent forwarding status

Type

$socket_buffer

$socket_buffer : 

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

Type

$expected_bytes

$expected_bytes : 

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

Type

Methods

__construct()

__construct(  $address = null) : \phpseclib\System\SSH\Agent

Default Constructor

Parameters

$address

Returns

\phpseclib\System\SSH\Agent

requestIdentities()

requestIdentities() : array

Request Identities

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

Returns

array

startSSHForwarding()

startSSHForwarding(\phpseclib\System\SSH\Net_SSH2  $ssh) : boolean

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

Parameters

\phpseclib\System\SSH\Net_SSH2 $ssh

Returns

boolean

_request_forwarding()

_request_forwarding(\phpseclib\System\SSH\Net_SSH2  $ssh) : boolean

Request agent forwarding of remote server

Parameters

\phpseclib\System\SSH\Net_SSH2 $ssh

Returns

boolean

_on_channel_open()

_on_channel_open(\phpseclib\System\SSH\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

\phpseclib\System\SSH\Net_SSH2 $ssh

_forward_data()

_forward_data(string  $data) : \phpseclib\System\SSH\data

Forward data to SSH Agent and return data reply

Parameters

string $data

Returns

\phpseclib\System\SSH\data —

from SSH Agent