Remote
    
            
            in package
            
        
    
    
    
        
            Runs remote commands.
Tags
Table of Contents
- $server : SSH2|null
- $serverConfig : RemoteServerConfiguration|null
- __construct() : mixed
- Constructor
- connect() : void
- 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
    private
        SSH2|null
    $server
     = null
    
        SSH2 server handle
$serverConfig
    private
        RemoteServerConfiguration|null
    $serverConfig
     = null
        
        
    
Methods
__construct()
Constructor
    public
                    __construct() : mixed
    
    
    
        Return values
mixed —connect()
Connects to the given SSH server.
    public
                    connect(RemoteServerConfiguration|null $server) : void
    
        Parameters
- $server : RemoteServerConfiguration|null
- 
                    server (e.g. localhost or localhost,1234) 
Tags
Return values
void —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