Remote
in package
Runs remote commands.
Tags
Table of Contents
- $server : mixed
- SSH2 server handle
- $serverConfig : RemoteServerConfiguration
- __construct() : mixed
- Constructor
- connect() : mixed
- Connects to the given SSH server.
- disconnect() : mixed
- Closes the connection.
- execute() : string
- Sends commands to remote script.
- loadKey() : AsymmetricKey
- Loads the key
- loginSSH() : mixed
- Performs a login to the provided SSH handle.
Properties
$server
SSH2 server handle
private
mixed
$server
$serverConfig
private
RemoteServerConfiguration
$serverConfig
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —connect()
Connects to the given SSH server.
public
connect(RemoteServerConfiguration $server) : mixed
Parameters
- $server : RemoteServerConfiguration
-
server (e.g. localhost or localhost,1234)
Tags
Return values
mixed —disconnect()
Closes the connection.
public
disconnect() : mixed
Return values
mixed —execute()
Sends commands to remote script.
public
execute(string $command) : string
Parameters
- $command : string
-
command to execute
Return values
string —output of remote script
loadKey()
Loads the key
public
loadKey(string $keyPath, string $keyPassword) : AsymmetricKey
Parameters
- $keyPath : string
-
file name
- $keyPassword : string
-
password
Tags
Return values
AsymmetricKey —key object
loginSSH()
Performs a login to the provided SSH handle.
private
loginSSH(SSH2 $handle) : mixed
Parameters
- $handle : SSH2
-
SSH handle