PHP Class AwsInspector\Ssh\Connection

Author: Fabrizio Branca
Datei anzeigen Open project: aoepeople/stackformation Class Usage Examples

Protected Properties

Property Type Description
$host string
$jumpHost AwsInspector\Model\Ec2\Instance
$multiplex boolean
$multiplexedConnections array
$privateKey PrivateKey
$username string

Public Methods

Method Description
__construct ( $username, $host, PrivateKey $privateKey = null, Instance $jumpHost = null, boolean $multiplex = false ) Connection constructor.
__toString ( )
closeMuxConnections ( ) Close all multiplexed connections
connect ( ) Interactive connection
exec ( string $command, string $asUser = null ) : array Execute command on this connection
getHost ( ) : string
getJumpHost ( ) : Instance
getPrivateKey ( ) : PrivateKey
getUsername ( ) : string
isMultiplex ( ) : boolean
tunnel ( $configuration ) Interactive connection

Method Details

__construct() public method

Connection constructor.
public __construct ( $username, $host, PrivateKey $privateKey = null, Instance $jumpHost = null, boolean $multiplex = false )
$username
$host
$privateKey PrivateKey
$jumpHost AwsInspector\Model\Ec2\Instance
$multiplex boolean

__toString() public method

public __toString ( )

closeMuxConnections() public static method

Close all multiplexed connections
public static closeMuxConnections ( )

connect() public method

Interactive connection
public connect ( )

exec() public method

Execute command on this connection
public exec ( string $command, string $asUser = null ) : array
$command string
$asUser string
return array

getHost() public method

public getHost ( ) : string
return string

getJumpHost() public method

public getJumpHost ( ) : Instance
return AwsInspector\Model\Ec2\Instance

getPrivateKey() public method

public getPrivateKey ( ) : PrivateKey
return PrivateKey

getUsername() public method

public getUsername ( ) : string
return string

isMultiplex() public method

public isMultiplex ( ) : boolean
return boolean

tunnel() public method

Interactive connection
public tunnel ( $configuration )

Property Details

$host protected_oe property

protected string $host
return string

$jumpHost protected_oe property

protected Instance,AwsInspector\Model\Ec2 $jumpHost
return AwsInspector\Model\Ec2\Instance

$multiplex protected_oe property

protected bool $multiplex
return boolean

$multiplexedConnections protected_oe static_oe property

protected static array $multiplexedConnections
return array

$privateKey protected_oe property

protected PrivateKey,AwsInspector\Ssh $privateKey
return PrivateKey

$username protected_oe property

protected string $username
return string