Merge "improve the wait logic in nested ssh bugreport"