PHP Class Net_SSH2, TeamPass

Author: Jim Wigginton ([email protected])
Afficher le fichier Open project: nilsteampassnet/TeamPass Class Usage Examples

Méthodes publiques

Свойство 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éthodes publiques

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.

Method Details

Net_SSH2() public méthode

$host can either be a string, representing the host, or a stream resource.
See also: self::login()
public Net_SSH2 ( mixed $host, integer $port = 22, integer $timeout = 10 ) : Net_SSH2
$host mixed
$port integer
$timeout integer
Résultat Net_SSH2

__destruct() public méthode

Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call disconnect().
public __destruct ( )

_append_log() public méthode

Makes sure that only the last 1MB worth of packets will be logged
public _append_log ( $message_number, $message )

_array_intersect_first() public méthode

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.
public _array_intersect_first ( array $array1, array $array2 ) : mixed
$array1 array
$array2 array
Résultat mixed False if intersection is empty, else intersected value.

_close_channel() public méthode

Net_SSH2 doesn't properly close most channels. For exec() channels are normally closed by the server and for SFTP channels are presumably closed when the client disconnects. This functions is intended for SCP more than anything.
public _close_channel ( integer $client_channel, boolean $want_reply = false ) : boolean
$client_channel integer
$want_reply boolean
Résultat boolean

_connect() public méthode

Connect to an SSHv2 server
public _connect ( ) : boolean
Résultat boolean

_define_array() public méthode

Takes any number of arrays whose indices are integers and whose values are strings and defines a bunch of named constants from it, using the value as the name of the constant and the index as the value of the constant. If any of the constants that would be defined already exists, none of the constants will be defined.
public _define_array ( )

_disconnect() public méthode

Disconnect
public _disconnect ( integer $reason ) : boolean
$reason integer
Résultat boolean

_encryption_algorithm_to_key_size() public méthode

Maps an encryption algorithm name to the number of key bytes.
public _encryption_algorithm_to_key_size ( string $algorithm ) : integer | null
$algorithm string Name of the encryption algorithm
Résultat integer | null Number of bytes as an integer or null for unknown

_filter() public méthode

Because some binary packets need to be ignored...
See also: self::_get_binary_packet()
public _filter ( $payload ) : string
Résultat string

_format_log() public méthode

Formats a log for printing
public _format_log ( array $message_log, array $message_number_log ) : string
$message_log array
$message_number_log array
Résultat string

_format_log_helper() public méthode

For use with preg_replace_callback()
public _format_log_helper ( array $matches ) : string
$matches array
Résultat string

_generate_identifier() public méthode

You should overwrite this method in your own class if you want to use another identifier
public _generate_identifier ( ) : string
Résultat string

_get_binary_packet() public méthode

See '6. Binary Packet Protocol' of rfc4253 for more info.
See also: self::_send_binary_packet()
public _get_binary_packet ( ) : string
Résultat string

_get_channel_packet() public méthode

Returns the data as a string if it's available and false if not.
public _get_channel_packet ( $client_channel, $skip_extended = false ) : mixed
$client_channel
Résultat mixed

_get_interactive_channel() public méthode

Return the channel to be used with read() / write()
See also: self::read()
See also: self::write()
public _get_interactive_channel ( ) : integer
Résultat integer

_get_open_channel() public méthode

Return an available open channel
public _get_open_channel ( ) : integer
Résultat integer

_initShell() public méthode

Creates an interactive shell
See also: self::read()
See also: self::write()
public _initShell ( ) : boolean
Résultat boolean

_key_exchange() public méthode

Key Exchange
public _key_exchange ( string $kexinit_payload_server )
$kexinit_payload_server string

_keyboard_interactive_login() public méthode

See {@link http://tools.ietf.org/html/rfc4256 RFC4256} for details. This is not a full-featured keyboard-interactive authenticator.
public _keyboard_interactive_login ( string $username, string $password ) : boolean
$username string
$password string
Résultat boolean

_keyboard_interactive_process() public méthode

Handle the keyboard-interactive requests / responses.

_login() public méthode

Login Helper
See also: self::_login_helper()
public _login ( string $username ) : boolean
$username string
Résultat boolean

_login_helper() public méthode

Login Helper
public _login_helper ( string $username, string $password = null ) : boolean
$username string
$password string
Résultat boolean

_on_channel_open() public méthode

Used when channels are created to inform agent of said channel opening. Must be called after channel open confirmation received
public _on_channel_open ( )

_privatekey_login() public méthode

Login with an RSA private key
public _privatekey_login ( string $username, $privatekey ) : boolean
$username string
Résultat boolean

_send_binary_packet() public méthode

See '6. Binary Packet Protocol' of rfc4253 for more info.
See also: self::_get_binary_packet()
public _send_binary_packet ( string $data, string $logged = null ) : boolean
$data string
$logged string
Résultat boolean

_send_channel_packet() public méthode

Spans multiple SSH_MSG_CHANNEL_DATAs if appropriate
public _send_channel_packet ( integer $client_channel, string $data ) : boolean
$client_channel integer
$data string
Résultat boolean

_ssh_agent_login() public méthode

Login with an ssh-agent provided key
public _ssh_agent_login ( string $username, System_SSH_Agent $agent ) : boolean
$username string
$agent System_SSH_Agent
Résultat boolean

_string_shift() public méthode

Inspired by array_shift
public _string_shift ( string &$string, integer $index = 1 ) : string
$string string
$index integer
Résultat string

disablePTY() public méthode

Disable request-pty when using exec()
public disablePTY ( )

disableQuietMode() public méthode

Show stderr in output
public disableQuietMode ( )

disconnect() public méthode

Disconnect
public disconnect ( )

enablePTY() public méthode

Enable request-pty when using exec()
public enablePTY ( )

enableQuietMode() public méthode

Suppress stderr from output
public enableQuietMode ( )

exec() public méthode

If $callback is set to false then Net_SSH2::_get_channel_packet(NET_SSH2_CHANNEL_EXEC) will need to be called manually. In all likelihood, this is not a feature you want to be taking advantage of.
public exec ( string $command, Callback $callback = null ) : string
$command string
$callback Callback
Résultat string

getBannerMessage() public méthode

Quoting from the RFC, "in some jurisdictions, sending a warning message before authentication may be relevant for getting legal protection."
public getBannerMessage ( ) : string
Résultat string

getCompressionAlgorithmsClient2Server() public méthode

Return a list of the compression algorithms the server supports, when receiving stuff from the client.

getCompressionAlgorithmsServer2Client() public méthode

Return a list of the compression algorithms the server supports, when sending stuff to the client.

getEncryptionAlgorithmsClient2Server() public méthode

Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client.

getEncryptionAlgorithmsServer2Client() public méthode

Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client.

getErrors() public méthode

Returns all errors
public getErrors ( ) : string
Résultat string

getExitStatus() public méthode

Returns the exit status of an SSH command or false.
public getExitStatus ( ) : false | integer
Résultat false | integer

getKexAlgorithms() public méthode

Return a list of the key exchange algorithms the server supports.
public getKexAlgorithms ( ) : array
Résultat array

getLanguagesClient2Server() public méthode

Return a list of the languages the server supports, when receiving stuff from the client.
public getLanguagesClient2Server ( ) : array
Résultat array

getLanguagesServer2Client() public méthode

Return a list of the languages the server supports, when sending stuff to the client.
public getLanguagesServer2Client ( ) : array
Résultat array

getLastError() public méthode

Returns the last error
public getLastError ( ) : string
Résultat string

getLog() public méthode

Returns a string if NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX, an array if NET_SSH2_LOGGING == NET_SSH2_LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING')
public getLog ( ) : array | false | string
Résultat array | false | string

getMACAlgorithmsClient2Server() public méthode

Return a list of the MAC algorithms the server supports, when receiving stuff from the client.
public getMACAlgorithmsClient2Server ( ) : array
Résultat array

getMACAlgorithmsServer2Client() public méthode

Return a list of the MAC algorithms the server supports, when sending stuff to the client.
public getMACAlgorithmsServer2Client ( ) : array
Résultat array

getServerHostKeyAlgorithms() public méthode

Return a list of the host key (public key) algorithms the server supports.
public getServerHostKeyAlgorithms ( ) : array
Résultat array

getServerIdentification() public méthode

Return the server identification.
public getServerIdentification ( ) : string
Résultat string

getServerPublicHostKey() public méthode

Caching this the first time you connect to a server and checking the result on subsequent connections is recommended. Returns false if the server signature is not signed correctly with the public host key.
public getServerPublicHostKey ( ) : mixed
Résultat mixed

getStdError() public méthode

Get the output from stdError
public getStdError ( )

getWindowColumns() public méthode

Returns the number of columns for the terminal window size.
public getWindowColumns ( ) : integer
Résultat integer

getWindowRows() public méthode

Returns the number of rows for the terminal window size.
public getWindowRows ( ) : integer
Résultat integer

isAuthenticated() public méthode

Have you successfully been logged in?
public isAuthenticated ( ) : boolean
Résultat boolean

isConnected() public méthode

Is the connection still active?
public isConnected ( ) : boolean
Résultat boolean

isPTYEnabled() public méthode

Returns whether request-pty is enabled or not
See also: self::enablePTY()
See also: self::disablePTY()
public isPTYEnabled ( ) : boolean
Résultat boolean

isQuietModeEnabled() public méthode

Returns whether Quiet Mode is enabled or not
See also: self::enableQuietMode()
See also: self::disableQuietMode()
public isQuietModeEnabled ( ) : boolean
Résultat boolean

isTimeout() public méthode

Did exec() or read() return because they timed out or because they encountered the end?
public isTimeout ( )

login() public méthode

The $password parameter can be a plaintext password, a Crypt_RSA object or an array
See also: self::_login()
public login ( string $username ) : boolean
$username string
Résultat boolean

read() public méthode

Returns when there's a match for $expect, which can take the form of a string literal or, if $mode == NET_SSH2_READ_REGEX, a regular expression.
See also: self::write()
public read ( string $expect = '', integer $mode = NET_SSH2_READ_SIMPLE ) : string
$expect string
$mode integer
Résultat string

reset() public méthode

If read() timed out you might want to just close the channel and have it auto-restart on the next read() call
public reset ( )

setCryptoEngine() public méthode

Possible $engine values: CRYPT_MODE_INTERNAL, CRYPT_MODE_MCRYPT
public setCryptoEngine ( integer $engine )
$engine integer

setTimeout() public méthode

$ssh->exec('ping 127.0.0.1'); on a Linux host will never return and will run indefinitely. setTimeout() makes it so it'll timeout. Setting $timeout to false or 0 will mean there is no timeout.
public setTimeout ( mixed $timeout )
$timeout mixed

setWindowColumns() public méthode

Sets the number of columns for the terminal window size.
public setWindowColumns ( integer $value )
$value integer

setWindowRows() public méthode

Sets the number of rows for the terminal window size.
public setWindowRows ( integer $value )
$value integer

setWindowSize() public méthode

Sets the number of columns and rows for the terminal window size.
public setWindowSize ( integer $columns = 80, integer $rows = 24 )
$columns integer
$rows integer

startSubsystem() public méthode

Right now only one subsystem at a time is supported. To support multiple subsystem's stopSubsystem() could accept a string that contained the name of the subsystem, but at that point, only one subsystem of each type could be opened. To support multiple subsystem's of the same name maybe it'd be best if startSubsystem() generated a new channel id and returns that and then that that was passed into stopSubsystem() but that'll be saved for a future date and implemented if there's sufficient demand for such a feature.
See also: self::stopSubsystem()
public startSubsystem ( string $subsystem ) : boolean
$subsystem string
Résultat boolean

stopSubsystem() public méthode

Stops a subsystem.
See also: self::startSubsystem()
public stopSubsystem ( ) : boolean
Résultat boolean

write() public méthode

Inputs a command into an interactive shell.
See also: self::read()
public write ( string $cmd ) : boolean
$cmd string
Résultat boolean

Property Details

$agent public_oe property

A System_SSH_Agent for use in the SSH2 Agent Forwarding scenario
public System_SSH_Agent $agent
Résultat System_SSH_Agent

$banner_message public_oe property

Quoting from the RFC, "in some jurisdictions, sending a warning message before authentication may be relevant for getting legal protection."
See also: self::_filter()
See also: self::getBannerMessage()
public string $banner_message
Résultat string

$bitmap public_oe property

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.
public int $bitmap
Résultat integer

$channel_buffers public_oe property

If a client requests a packet from one channel but receives two packets from another those packets should be placed in a buffer
See also: self::_get_channel_packet()
See also: self::exec()
public array $channel_buffers
Résultat array

$channel_extended_data_type_codes public_oe property

SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes
See also: self::Net_SSH2()
public array $channel_extended_data_type_codes
Résultat array

$channel_open_failure_reasons public_oe property

SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254
See also: self::Net_SSH2()
public array $channel_open_failure_reasons
Résultat array

$channel_status public_oe property

Contains the type of the last sent message
See also: self::_get_channel_packet()
public array $channel_status
Résultat array

$compression_algorithms_client_to_server public_oe property

Compression Algorithms: Client to Server
See also: self::getCompressionAlgorithmsClient2Server()
public array|false $compression_algorithms_client_to_server
Résultat array | false

$compression_algorithms_server_to_client public_oe property

Compression Algorithms: Server to Client
See also: self::getCompressionAlgorithmsServer2Client()
public array|false $compression_algorithms_server_to_client
Résultat array | false

$crypto_engine public_oe property

Crypto Engine
See also: self::setCryptoEngine()
See also: self::_key_exchange()
public int $crypto_engine
Résultat integer

$curTimeout public_oe property

Current Timeout
See also: self::_get_channel_packet()
public $curTimeout

$decrypt public_oe property

Server to Client Encryption Object
See also: self::_get_binary_packet()
public object $decrypt
Résultat object

$decrypt_block_size public_oe property

Block Size for Client to Server Encryption
See also: self::Net_SSH2()
See also: self::_get_binary_packet()
public int $decrypt_block_size
Résultat integer

$disconnect_reasons public_oe property

Disconnection Message 'reason codes' defined in RFC4253
See also: self::Net_SSH2()
public array $disconnect_reasons
Résultat array

$encrypt public_oe property

Client to Server Encryption Object
See also: self::_send_binary_packet()
public object $encrypt
Résultat object

$encrypt_block_size public_oe property

"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
See also: self::Net_SSH2()
See also: self::_send_binary_packet()
public int $encrypt_block_size
Résultat integer

$encryption_algorithms_client_to_server public_oe property

Encryption Algorithms: Client to Server
See also: self::getEncryptionAlgorithmsClient2Server()
public array|false $encryption_algorithms_client_to_server
Résultat array | false

$encryption_algorithms_server_to_client public_oe property

Encryption Algorithms: Server to Client
See also: self::getEncryptionAlgorithmsServer2Client()
public array|false $encryption_algorithms_server_to_client
Résultat array | false

$errors public_oe property

Error information
See also: self::getErrors()
See also: self::getLastError()
public string $errors
Résultat string

$exchange_hash public_oe property

The current exchange hash
See also: self::_key_exchange()
public string $exchange_hash
Résultat string

$exit_status public_oe property

Exit status returned from ssh if any
public int $exit_status
Résultat integer

$fsock public_oe property

The Socket Object
public object $fsock
Résultat object

$get_seq_no public_oe property

See 'Section 6.4. Data Integrity' of rfc4253 for more info.
See also: self::_get_binary_packet()
public int $get_seq_no
Résultat integer

$hmac_check public_oe property

Server to Client HMAC Object
See also: self::_get_binary_packet()
public object $hmac_check
Résultat object

$hmac_create public_oe property

Client to Server HMAC Object
See also: self::_send_binary_packet()
public object $hmac_create
Résultat object

$hmac_size public_oe property

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.
See also: self::_get_binary_packet()
public int $hmac_size
Résultat integer

$host public_oe property

Hostname
See also: self::Net_SSH2()
See also: self::_connect()
public string $host
Résultat string

$identifier public_oe property

The SSH identifier
public string $identifier
Résultat string

$in_request_pty_exec public_oe property

Flag set while exec() is running when using enablePTY()
public bool $in_request_pty_exec
Résultat boolean

$in_subsystem public_oe property

Flag set after startSubsystem() is called
public bool $in_subsystem
Résultat boolean

$interactiveBuffer public_oe property

Interactive Buffer
See also: self::read()
public array $interactiveBuffer
Résultat array

$is_timeout public_oe property

Did read() timeout or return normally?
See also: self::isTimeout()
public bool $is_timeout
Résultat boolean

$kex_algorithms public_oe property

Key Exchange Algorithms
See also: self::getKexAlgorithims()
public array|false $kex_algorithms
Résultat array | false

$kex_dh_group_size_max public_oe property

Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
See also: self::_key_exchange()
public int $kex_dh_group_size_max
Résultat integer

$kex_dh_group_size_min public_oe property

Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
See also: self::_key_exchange()
public int $kex_dh_group_size_min
Résultat integer

$kex_dh_group_size_preferred public_oe property

Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
See also: self::_key_exchange()
public int $kex_dh_group_size_preferred
Résultat integer

$keyboard_requests_responses public_oe property

Keyboard Interactive Request / Responses
See also: self::_keyboard_interactive_process()
public array $keyboard_requests_responses
Résultat array

$languages_client_to_server public_oe property

Languages: Client to Server
See also: self::getLanguagesClient2Server()
public array|false $languages_client_to_server
Résultat array | false

$languages_server_to_client public_oe property

Languages: Server to Client
See also: self::getLanguagesServer2Client()
public array|false $languages_server_to_client
Résultat array | false

$last_interactive_response public_oe property

The Last Interactive Response
See also: self::_keyboard_interactive_process()
public string $last_interactive_response
Résultat string

$last_packet public_oe property

Time of first network activity
public int $last_packet
Résultat integer

$log_boundary public_oe property

Log Boundary
See also: self::_format_log()
public string $log_boundary
Résultat string

$log_long_width public_oe property

Log Long Width
See also: self::_format_log()
public int $log_long_width
Résultat integer

$log_short_width public_oe property

Log Short Width
See also: self::_format_log()
public int $log_short_width
Résultat integer

$log_size public_oe property

Should never exceed NET_SSH2_LOG_MAX_SIZE
See also: self::_send_binary_packet()
See also: self::_get_binary_packet()
public int $log_size
Résultat integer

$mac_algorithms_client_to_server public_oe property

MAC Algorithms: Client to Server
See also: self::getMACAlgorithmsClient2Server()
public array|false $mac_algorithms_client_to_server
Résultat array | false

$mac_algorithms_server_to_client public_oe property

MAC Algorithms: Server to Client
See also: self::getMACAlgorithmsServer2Client()
public array|false $mac_algorithms_server_to_client
Résultat array | false

$message_log public_oe property

Message Log
See also: self::getLog()
public array $message_log
Résultat array

$message_number_log public_oe property

Message Number Log
See also: self::getLog()
public array $message_number_log
Résultat array

$message_numbers public_oe property

Message Numbers
See also: self::Net_SSH2()
public array $message_numbers
Résultat array

$packet_size_client_to_server public_oe property

Maximum packet size indexed by channel
See also: self::_send_channel_packet()
public array $packet_size_client_to_server
Résultat array

$port public_oe property

Port Number
See also: self::Net_SSH2()
See also: self::_connect()
public int $port
Résultat integer

$quiet_mode public_oe property

Flag to suppress stderr from output
See also: self::enableQuietMode()
public $quiet_mode

$realtime_log_file public_oe property

Real-time log file pointer
See also: self::_append_log()
public resource $realtime_log_file
Résultat resource

$realtime_log_size public_oe property

Real-time log file size
See also: self::_append_log()
public int $realtime_log_size
Résultat integer

$realtime_log_wrap public_oe property

Real-time log file wrap boolean
See also: self::_append_log()
public $realtime_log_wrap

$request_pty public_oe property

Flag to request a PTY when using exec()
See also: self::enablePTY()
public bool $request_pty
Résultat boolean

$send_seq_no public_oe property

See 'Section 6.4. Data Integrity' of rfc4253 for more info.
See also: self::_send_binary_packet()
public int $send_seq_no
Résultat integer

$server_channels public_oe property

Maps client channels to server channels
See also: self::_get_channel_packet()
See also: self::exec()
public array $server_channels
Résultat array

$server_host_key_algorithms public_oe property

Server Host Key Algorithms
See also: self::getServerHostKeyAlgorithms()
public array|false $server_host_key_algorithms
Résultat array | false

$server_identifier public_oe property

Server Identifier
See also: self::getServerIdentification()
public array|false $server_identifier
Résultat array | false

$server_public_host_key public_oe property

Server Public Host Key
See also: self::getServerPublicHostKey()
public string $server_public_host_key
Résultat string

$session_id public_oe property

"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
See also: self::_key_exchange()
public string $session_id
Résultat string

$signature public_oe property

Verified against $this->session_id
See also: self::getServerPublicHostKey()
public string $signature
Résultat string

$signature_format public_oe property

ssh-rsa or ssh-dss.
See also: self::getServerPublicHostKey()
public string $signature_format
Résultat string

$signature_validated public_oe property

Has the signature been validated?
See also: self::getServerPublicHostKey()
public bool $signature_validated
Résultat boolean

$stdErrorLog public_oe property

Contents of stdError
public string $stdErrorLog
Résultat string

$terminal_modes public_oe property

Terminal Modes
See also: self::Net_SSH2()
public array $terminal_modes
Résultat array

$timeout public_oe property

Timeout
See also: self::setTimeout()
public $timeout

$windowColumns public_oe property

Number of columns for terminal window size
See also: self::getWindowColumns()
See also: self::setWindowColumns()
See also: self::setWindowSize()
public int $windowColumns
Résultat integer

$windowRows public_oe property

Number of columns for terminal window size
See also: self::getWindowRows()
See also: self::setWindowRows()
See also: self::setWindowSize()
public int $windowRows
Résultat integer

$window_size public_oe property

Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB)
See also: self::_send_channel_packet()
See also: self::exec()
public int $window_size
Résultat integer

$window_size_client_to_server public_oe property

Window size indexed by channel
See also: self::_get_channel_packet()
public array $window_size_client_to_server
Résultat array

$window_size_server_to_client public_oe property

Window size indexed by channel
See also: self::_send_channel_packet()
public array $window_size_server_to_client
Résultat array