public function getAuthentication($passphrase = null, $user = null)
    {
        if (is_null($user) && !isset($this->config['user'])) {
            throw new RuntimeException("Can not authenticate for '{$this->host}' could not find user to authenticate as");
        }
        $user = $user ?: $this->config['user'];
        if (isset($this->config['identityfile'])) {
            return new Authentication\PublicKeyFile(
                $user,
                $this->config['identityfile'] . '.pub',
                $this->config['identityfile'],
                $passphrase
            );
        } else {
            return new Authentication\None(
                $user
            );
        }
    }