Свойство | Type | Description | |
---|---|---|---|
$agent | System_SSH_Agent | A System_SSH_Agent for use in the SSH2 Agent Forwarding scenario | |
$banner_message | string | Quoting from the RFC, "in some jurisdictions, sending a warning message before authentication may be relevant for getting legal protection." | |
$bitmap | integer | The bits that are set represent functions that have been called already. This is used to determine if a requisite function has been successfully executed. If not, an error should be thrown. | |
$channel_buffers | array | If a client requests a packet from one channel but receives two packets from another those packets should be placed in a buffer | |
$channel_extended_data_type_codes | array | SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes | |
$channel_open_failure_reasons | array | SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254 | |
$channel_status | array | Contains the type of the last sent message | |
$compression_algorithms_client_to_server | array | false | Compression Algorithms: Client to Server | |
$compression_algorithms_server_to_client | array | false | Compression Algorithms: Server to Client | |
$crypto_engine | integer | Crypto Engine | |
$curTimeout | Current Timeout | ||
$decrypt | object | Server to Client Encryption Object | |
$decrypt_block_size | integer | Block Size for Client to Server Encryption | |
$disconnect_reasons | array | Disconnection Message 'reason codes' defined in RFC4253 | |
$encrypt | object | Client to Server Encryption Object | |
$encrypt_block_size | integer | "Note that the length of the concatenation of 'packet_length', 'padding_length', 'payload', and 'random padding' MUST be a multiple of the cipher block size or 8, whichever is larger. This constraint MUST be enforced, even when using stream ciphers." -- http://tools.ietf.org/html/rfc4253#section-6 | |
$encryption_algorithms_client_to_server | array | false | Encryption Algorithms: Client to Server | |
$encryption_algorithms_server_to_client | array | false | Encryption Algorithms: Server to Client | |
$errors | string | Error information | |
$exchange_hash | string | The current exchange hash | |
$exit_status | integer | Exit status returned from ssh if any | |
$fsock | object | The Socket Object | |
$get_seq_no | integer | See 'Section 6.4. Data Integrity' of rfc4253 for more info. | |
$hmac_check | object | Server to Client HMAC Object | |
$hmac_create | object | Client to Server HMAC Object | |
$hmac_size | integer | We need to know how big the HMAC will be for the server to client direction so that we know how many bytes to read. For the client to server side, the HMAC object will make the HMAC as long as it needs to be. All we need to do is append it. | |
$host | string | Hostname | |
$identifier | string | The SSH identifier | |
$in_request_pty_exec | boolean | Flag set while exec() is running when using enablePTY() | |
$in_subsystem | boolean | Flag set after startSubsystem() is called | |
$interactiveBuffer | array | Interactive Buffer | |
$is_timeout | boolean | Did read() timeout or return normally? | |
$kex_algorithms | array | false | Key Exchange Algorithms | |
$kex_dh_group_size_max | integer | Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods | |
$kex_dh_group_size_min | integer | Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods | |
$kex_dh_group_size_preferred | integer | Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods | |
$keyboard_requests_responses | array | Keyboard Interactive Request / Responses | |
$languages_client_to_server | array | false | Languages: Client to Server | |
$languages_server_to_client | array | false | Languages: Server to Client | |
$last_interactive_response | string | The Last Interactive Response | |
$last_packet | integer | Time of first network activity | |
$log_boundary | string | Log Boundary | |
$log_long_width | integer | Log Long Width | |
$log_short_width | integer | Log Short Width | |
$log_size | integer | Should never exceed NET_SSH2_LOG_MAX_SIZE | |
$mac_algorithms_client_to_server | array | false | MAC Algorithms: Client to Server | |
$mac_algorithms_server_to_client | array | false | MAC Algorithms: Server to Client | |
$message_log | array | Message Log | |
$message_number_log | array | Message Number Log | |
$message_numbers | array | Message Numbers | |
$packet_size_client_to_server | array | Maximum packet size indexed by channel | |
$port | integer | Port Number | |
$quiet_mode | Flag to suppress stderr from output | ||
$realtime_log_file | resource | Real-time log file pointer | |
$realtime_log_size | integer | Real-time log file size | |
$realtime_log_wrap | Real-time log file wrap boolean | ||
$request_pty | boolean | Flag to request a PTY when using exec() | |
$send_seq_no | integer | See 'Section 6.4. Data Integrity' of rfc4253 for more info. | |
$server_channels | array | Maps client channels to server channels | |
$server_host_key_algorithms | array | false | Server Host Key Algorithms | |
$server_identifier | array | false | Server Identifier | |
$server_public_host_key | string | Server Public Host Key | |
$session_id | string | "The exchange hash H from the first key exchange is additionally used as the session identifier, which is a unique identifier for this connection." -- http://tools.ietf.org/html/rfc4253#section-7.2 | |
$signature | string | Verified against $this->session_id | |
$signature_format | string | ssh-rsa or ssh-dss. | |
$signature_validated | boolean | Has the signature been validated? | |
$stdErrorLog | string | Contents of stdError | |
$terminal_modes | array | Terminal Modes | |
$timeout | Timeout | ||
$windowColumns | integer | Number of columns for terminal window size | |
$windowRows | integer | Number of columns for terminal window size | |
$window_size | integer | Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB) | |
$window_size_client_to_server | array | Window size indexed by channel | |
$window_size_server_to_client | array | Window size indexed by channel |
Méthode | Description | |
---|---|---|
Net_SSH2 ( mixed $host, integer $port = 22, integer $timeout = 10 ) : Net_SSH2 | Default Constructor. | |
__destruct ( ) | Destructor. | |
_append_log ( $message_number, $message ) | Logs data packets | |
_array_intersect_first ( array $array1, array $array2 ) : mixed | Returns the first value of the intersection of two arrays or false if the intersection is empty. The order is defined by the first parameter. | |
_close_channel ( integer $client_channel, boolean $want_reply = false ) : boolean | Closes and flushes a channel | |
_connect ( ) : boolean | Connect to an SSHv2 server | |
_define_array ( ) | Define Array | |
_disconnect ( integer $reason ) : boolean | Disconnect | |
_encryption_algorithm_to_key_size ( string $algorithm ) : integer | null | Maps an encryption algorithm name to the number of key bytes. | |
_filter ( $payload ) : string | Filter Binary Packets | |
_format_log ( array $message_log, array $message_number_log ) : string | Formats a log for printing | |
_format_log_helper ( array $matches ) : string | Helper function for _format_log | |
_generate_identifier ( ) : string | Generates the SSH identifier | |
_get_binary_packet ( ) : string | Gets Binary Packets | |
_get_channel_packet ( $client_channel, $skip_extended = false ) : mixed | Gets channel data | |
_get_interactive_channel ( ) : integer | Return the channel to be used with read() / write() | |
_get_open_channel ( ) : integer | Return an available open channel | |
_initShell ( ) : boolean | Creates an interactive shell | |
_key_exchange ( string $kexinit_payload_server ) | Key Exchange | |
_keyboard_interactive_login ( string $username, string $password ) : boolean | Login via keyboard-interactive authentication | |
_keyboard_interactive_process ( ) : boolean | Handle the keyboard-interactive requests / responses. | |
_login ( string $username ) : boolean | Login Helper | |
_login_helper ( string $username, string $password = null ) : boolean | Login Helper | |
_on_channel_open ( ) | Helper function for agent->_on_channel_open() | |
_privatekey_login ( string $username, $privatekey ) : boolean | Login with an RSA private key | |
_send_binary_packet ( string $data, string $logged = null ) : boolean | Sends Binary Packets | |
_send_channel_packet ( integer $client_channel, string $data ) : boolean | Sends channel data | |
_ssh_agent_login ( string $username, System_SSH_Agent $agent ) : boolean | Login with an ssh-agent provided key | |
_string_shift ( string &$string, integer $index = 1 ) : string | String Shift | |
disablePTY ( ) | Disable request-pty when using exec() | |
disableQuietMode ( ) | Disable Quiet Mode | |
disconnect ( ) | Disconnect | |
enablePTY ( ) | Enable request-pty when using exec() | |
enableQuietMode ( ) | Enable Quiet Mode | |
exec ( string $command, Callback $callback = null ) : string | Execute Command | |
getBannerMessage ( ) : string | Returns the banner message. | |
getCompressionAlgorithmsClient2Server ( ) : array | Return a list of the compression algorithms the server supports, when receiving stuff from the client. | |
getCompressionAlgorithmsServer2Client ( ) : array | Return a list of the compression algorithms the server supports, when sending stuff to the client. | |
getEncryptionAlgorithmsClient2Server ( ) : array | Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. | |
getEncryptionAlgorithmsServer2Client ( ) : array | Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. | |
getErrors ( ) : string | Returns all errors | |
getExitStatus ( ) : false | integer | Returns the exit status of an SSH command or false. | |
getKexAlgorithms ( ) : array | Return a list of the key exchange algorithms the server supports. | |
getLanguagesClient2Server ( ) : array | Return a list of the languages the server supports, when receiving stuff from the client. | |
getLanguagesServer2Client ( ) : array | Return a list of the languages the server supports, when sending stuff to the client. | |
getLastError ( ) : string | Returns the last error | |
getLog ( ) : array | false | string | Returns a log of the packets that have been sent and received. | |
getMACAlgorithmsClient2Server ( ) : array | Return a list of the MAC algorithms the server supports, when receiving stuff from the client. | |
getMACAlgorithmsServer2Client ( ) : array | Return a list of the MAC algorithms the server supports, when sending stuff to the client. | |
getServerHostKeyAlgorithms ( ) : array | Return a list of the host key (public key) algorithms the server supports. | |
getServerIdentification ( ) : string | Return the server identification. | |
getServerPublicHostKey ( ) : mixed | Returns the server public host key. | |
getStdError ( ) | Get the output from stdError | |
getWindowColumns ( ) : integer | Returns the number of columns for the terminal window size. | |
getWindowRows ( ) : integer | Returns the number of rows for the terminal window size. | |
isAuthenticated ( ) : boolean | Have you successfully been logged in? | |
isConnected ( ) : boolean | Is the connection still active? | |
isPTYEnabled ( ) : boolean | Returns whether request-pty is enabled or not | |
isQuietModeEnabled ( ) : boolean | Returns whether Quiet Mode is enabled or not | |
isTimeout ( ) | Is timeout? | |
login ( string $username ) : boolean | Login | |
read ( string $expect = '', integer $mode = NET_SSH2_READ_SIMPLE ) : string | Returns the output of an interactive shell | |
reset ( ) | Closes a channel | |
setCryptoEngine ( integer $engine ) | Set Crypto Engine Mode | |
setTimeout ( mixed $timeout ) | Set Timeout | |
setWindowColumns ( integer $value ) | Sets the number of columns for the terminal window size. | |
setWindowRows ( integer $value ) | Sets the number of rows for the terminal window size. | |
setWindowSize ( integer $columns = 80, integer $rows = 24 ) | Sets the number of columns and rows for the terminal window size. | |
startSubsystem ( string $subsystem ) : boolean | Start a subsystem. | |
stopSubsystem ( ) : boolean | Stops a subsystem. | |
write ( string $cmd ) : boolean | Inputs a command into an interactive shell. |
public __destruct ( ) |
public _append_log ( $message_number, $message ) |
public _define_array ( ) |
public _disconnect ( integer $reason ) : boolean | ||
$reason | integer | |
Résultat | boolean |
public _format_log_helper ( array $matches ) : string | ||
$matches | array | |
Résultat | string |
public _generate_identifier ( ) : string | ||
Résultat | string |
public _get_binary_packet ( ) : string | ||
Résultat | string |
public _get_channel_packet ( $client_channel, $skip_extended = false ) : mixed | ||
$client_channel | ||
Résultat | mixed |
public _get_interactive_channel ( ) : integer | ||
Résultat | integer |
public _get_open_channel ( ) : integer | ||
Résultat | integer |
public _initShell ( ) : boolean | ||
Résultat | boolean |
public _key_exchange ( string $kexinit_payload_server ) | ||
$kexinit_payload_server | string |
public _keyboard_interactive_process ( ) : boolean | ||
Résultat | boolean |
public _on_channel_open ( ) |
public _privatekey_login ( string $username, $privatekey ) : boolean | ||
$username | string | |
Résultat | boolean |
public _ssh_agent_login ( string $username, System_SSH_Agent $agent ) : boolean | ||
$username | string | |
$agent | System_SSH_Agent | |
Résultat | boolean |
public getBannerMessage ( ) : string | ||
Résultat | string |
public getCompressionAlgorithmsClient2Server ( ) : array | ||
Résultat | array |
public getCompressionAlgorithmsServer2Client ( ) : array | ||
Résultat | array |
public getEncryptionAlgorithmsClient2Server ( ) : array | ||
Résultat | array |
public getEncryptionAlgorithmsServer2Client ( ) : array | ||
Résultat | array |
public getExitStatus ( ) : false | integer | ||
Résultat | false | integer |
public getKexAlgorithms ( ) : array | ||
Résultat | array |
public getLanguagesClient2Server ( ) : array | ||
Résultat | array |
public getLanguagesServer2Client ( ) : array | ||
Résultat | array |
public getLastError ( ) : string | ||
Résultat | string |
public getMACAlgorithmsClient2Server ( ) : array | ||
Résultat | array |
public getMACAlgorithmsServer2Client ( ) : array | ||
Résultat | array |
public getServerHostKeyAlgorithms ( ) : array | ||
Résultat | array |
public getServerIdentification ( ) : string | ||
Résultat | string |
public getServerPublicHostKey ( ) : mixed | ||
Résultat | mixed |
public getWindowColumns ( ) : integer | ||
Résultat | integer |
public getWindowRows ( ) : integer | ||
Résultat | integer |
public isAuthenticated ( ) : boolean | ||
Résultat | boolean |
public isConnected ( ) : boolean | ||
Résultat | boolean |
public isPTYEnabled ( ) : boolean | ||
Résultat | boolean |
public isQuietModeEnabled ( ) : boolean | ||
Résultat | boolean |
public isTimeout ( ) |
public reset ( ) |
public setCryptoEngine ( integer $engine ) | ||
$engine | integer |
public setTimeout ( mixed $timeout ) | ||
$timeout | mixed |
public setWindowColumns ( integer $value ) | ||
$value | integer |
public setWindowRows ( integer $value ) | ||
$value | integer |
public setWindowSize ( integer $columns = 80, integer $rows = 24 ) | ||
$columns | integer | |
$rows | integer |
public startSubsystem ( string $subsystem ) : boolean | ||
$subsystem | string | |
Résultat | boolean |
public stopSubsystem ( ) : boolean | ||
Résultat | boolean |
public System_SSH_Agent $agent | ||
Résultat | System_SSH_Agent |
public string $banner_message | ||
Résultat | string |
public int $bitmap | ||
Résultat | integer |
public array $channel_buffers | ||
Résultat | array |
public array $channel_extended_data_type_codes | ||
Résultat | array |
public array $channel_open_failure_reasons | ||
Résultat | array |
public array $channel_status | ||
Résultat | array |
public array|false $compression_algorithms_client_to_server | ||
Résultat | array | false |
public array|false $compression_algorithms_server_to_client | ||
Résultat | array | false |
public object $decrypt | ||
Résultat | object |
public int $decrypt_block_size | ||
Résultat | integer |
public array $disconnect_reasons | ||
Résultat | array |
public object $encrypt | ||
Résultat | object |
public int $encrypt_block_size | ||
Résultat | integer |
public array|false $encryption_algorithms_client_to_server | ||
Résultat | array | false |
public array|false $encryption_algorithms_server_to_client | ||
Résultat | array | false |
public string $exchange_hash | ||
Résultat | string |
public int $exit_status | ||
Résultat | integer |
public int $get_seq_no | ||
Résultat | integer |
public object $hmac_check | ||
Résultat | object |
public object $hmac_create | ||
Résultat | object |
public int $hmac_size | ||
Résultat | integer |
public bool $in_request_pty_exec | ||
Résultat | boolean |
public bool $in_subsystem | ||
Résultat | boolean |
public array $interactiveBuffer | ||
Résultat | array |
public bool $is_timeout | ||
Résultat | boolean |
public array|false $kex_algorithms | ||
Résultat | array | false |
public int $kex_dh_group_size_max | ||
Résultat | integer |
public int $kex_dh_group_size_min | ||
Résultat | integer |
public int $kex_dh_group_size_preferred | ||
Résultat | integer |
public array $keyboard_requests_responses | ||
Résultat | array |
public array|false $languages_client_to_server | ||
Résultat | array | false |
public array|false $languages_server_to_client | ||
Résultat | array | false |
public string $last_interactive_response | ||
Résultat | string |
public int $last_packet | ||
Résultat | integer |
public int $log_size | ||
Résultat | integer |
public array|false $mac_algorithms_client_to_server | ||
Résultat | array | false |
public array|false $mac_algorithms_server_to_client | ||
Résultat | array | false |
public array $message_number_log | ||
Résultat | array |
public array $packet_size_client_to_server | ||
Résultat | array |
public resource $realtime_log_file | ||
Résultat | resource |
public int $realtime_log_size | ||
Résultat | integer |
public bool $request_pty | ||
Résultat | boolean |
public int $send_seq_no | ||
Résultat | integer |
public array $server_channels | ||
Résultat | array |
public array|false $server_host_key_algorithms | ||
Résultat | array | false |
public array|false $server_identifier | ||
Résultat | array | false |
public string $server_public_host_key | ||
Résultat | string |
public string $session_id | ||
Résultat | string |
public string $signature | ||
Résultat | string |
public string $signature_format | ||
Résultat | string |
public bool $signature_validated | ||
Résultat | boolean |
public int $windowColumns | ||
Résultat | integer |
public int $windowRows | ||
Résultat | integer |
public int $window_size | ||
Résultat | integer |
public array $window_size_client_to_server | ||
Résultat | array |
public array $window_size_server_to_client | ||
Résultat | array |