Changes to ssh_connect to parse url's better

Tighten up some of the code in ssh_connect so that url's are parsed better and it makes fewer assumptions about which scheme has been requested.