# classes/phing/tasks/ext/SshTask.php

Execute commands on a remote host using ssh.

author
  Johan Van den Brande
package
  phing.tasks.ext
version
  $Id: SshTask.php 1205 2011-07-02 10:34:13Z mrook $

## \SshTask
jump to top

Execute commands on a remote host using ssh.

Use {@link Project#createTask} to register a new Task.

Extends from
  \Task
author
  Johan Van den Brande
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.ext
version
  $Id: SshTask.php 1205 2011-07-02 10:34:13Z mrook $

### Properties

`$command= ''`
Details

Type

`boolean $display= 'true'`

Whether to display the output of the command

Default value `true` Details

Type
  boolean

`$host= ''`
Details

Type

`$password= ''`
Details

Type

`$port= '22'`
Default value `22` Details

Type

`$privkeyfile= ''`
Details

Type

`$privkeyfilepassphrase= ''`
Details

Type

`string $property= ''`

The name of the property to capture (any) output of the command

Details

Type
  string

`$pubkeyfile= ''`
Details

Type

`$username= ''`
Details

Type

### Methods

`getCommand( ) :`
`getHost( ) :`
`getPassword( ) :`
`getPort( ) :`
`getPrivkeyfile( ) :`
Returns the private keyfile
`getPrivkeyfilepassphrase( $privkeyfilepassphrase ) :`
Returns the private keyfile passphrase
Parameters

Name | Type | Description
--- | --- | ---
$privkeyfilepassphrase |  |

`getPubkeyfile( ) :`
Returns the pubkeyfile
`getUsername( ) :`
`init( ) :`
`main( ) :`
`setCommand( $command ) :`
Parameters

Name | Type | Description
--- | --- | ---
$command |  |

`setDisplay( boolean $display ) :`
Sets whether to display the output of the command
Parameters

Name | Type | Description
--- | --- | ---
$display | boolean |

`setHost( $host ) :`
Parameters

Name | Type | Description
--- | --- | ---
$host |  |

`setPassword( $password ) :`
Parameters

Name | Type | Description
--- | --- | ---
$password |  |

`setPort( $port ) :`
Parameters

Name | Type | Description
--- | --- | ---
$port |  |

`setPrivkeyfile( $privkeyfile ) :`
Sets the private key file of the user to scp
Parameters

Name | Type | Description
--- | --- | ---
$privkeyfile |  |

`setPrivkeyfilepassphrase( $privkeyfilepassphrase ) :`
Sets the private key file passphrase of the user to scp
Parameters

Name | Type | Description
--- | --- | ---
$privkeyfilepassphrase |  |

`setProperty( string $property ) :`
Sets the name of the property to capture (any) output of the command
Parameters

Name | Type | Description
--- | --- | ---
$property | string |

`setPubkeyfile( $pubkeyfile ) :`
Sets the public key file of the user to scp
Parameters

Name | Type | Description
--- | --- | ---
$pubkeyfile |  |

`setUsername( $username ) :`
Parameters

Name | Type | Description
--- | --- | ---
$username |  |

Documentation was generated by DocBlox 0.13.1.