'Release all resources (process, temporary directory) used by an active
master SSH connection.'

def _cleanup_master_ssh(self):

    if (self.master_ssh_job is not None):
        utils.nuke_subprocess(self.master_ssh_job.sp)
        self.master_ssh_job = None
    if (self.master_ssh_tempdir is not None):
        self.master_ssh_tempdir.clean()
        self.master_ssh_tempdir = None
        self.master_ssh_option = ''
