Fix tests in the presence of openssh's ControlMaster setting.

If it is enabled, a number of tests hang.