Various fixes

* variable name fix
* pure ruby ssh connection detection