PHP Class AwsInspector\Ssh\Connection

Author: Fabrizio Branca
Show file 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 property

protected string $host
return string

$jumpHost protected property

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

$multiplex protected property

protected bool $multiplex
return boolean

$multiplexedConnections protected static property

protected static array $multiplexedConnections
return array

$privateKey protected property

protected PrivateKey,AwsInspector\Ssh $privateKey
return PrivateKey

$username protected property

protected string $username
return string