[paramiko/client.py does detection](https://github.com/paramiko/paramiko/blob/master/paramiko/client.py#L459-L470) by trying each class and trapping exceptions. I can do the same here.