Agent
class Agent (View source)
Pure-PHP ssh-agent client identity factory
requestIdentities() method pumps out \phpseclib\System\SSH\Agent\Identity objects
Constants
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 |
Unused |
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
Default Constructor
Request Identities
Signal that agent forwarding should be requested when a channel is opened
Request agent forwarding of remote server
On successful channel open
Forward data to SSH Agent and return data reply
Details
Agent
__construct($address = null)
Default Constructor
array
requestIdentities()
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
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
This method is called upon successful channel open to give the SSH Agent an opportunity to take further action. i.e. request agent forwarding
data
_forward_data(string $data)
Forward data to SSH Agent and return data reply