add support for improved connection handling for ssh