phingofficial/phing — pull request #152 by drock (2012-10-26 16:38:30+00:00)
Title: Ssh methods params options

With the default configuration of my php installation (Macports) and the Ubuntu machines I was trying to connect to, the SshTask was not usable. An error (-4) Invalid MAC Recieved would be returned.

This will happen in a bare script as well just using the ssh2_connect function. The solution was to correctly utilize the optional parameter ```$methods``` of the ssh2_connect function. This lets you specify properties about the encryption and compression of the connection.

The SshTask in Phing does not support the ability to specify these options when connecting however. This made the SshTask useless for me.

With this pull request I have added a Data Type ```sshconfig``` that can be used in conjuction with the SshTask and ScpTask classes. This allows you to specify the parameters to go into the ```$methods``` array as the third parameter to ssh2_connect. You can use the data type as a nested element of or . You may also use it as a referenced parameter since it will often be the case that you will use the same settings for multiple connections within one build file.

Example:
```xml

```

See the [ssh2_connect documentation](http://us3.php.net/ssh2_connect) for more information on the optional parameters.