Raise exception when connection fails

When ssh connection fails due to some error
we raise exception instead of exiting