Herzult/php-ssh — pull request #11 by camspiers (2013-01-25 00:10:55+00:00)
Title: Provide ability to configure connection and authentication from a ssh config file such as ~/.ssh/config

This PR provides the ability to get connection and authentication from a config file based on host matching. It uses the PublicKeyFile authentication if an IdentityFile is specified in the matching hosts configuration. The configuration options it pick up from the config file are HostName and Port. User and Identity file are used in the auth if available.

If your Identity file doesn't have a User declaration then you can pass one into `getAuthentication`. If your key is encrypted with a passphrase you can pass this in to `getAuthentication`.

This enables the follow types of usage:

~/.ssh/config
```
Host test testing.com
User test
HostName 111.111.111.111
Port 1234
IdentityFile ~/.ssh/id_dsa_testing
```

```
getAuthentication());
```
```
getAuthentication());
```