the threading and ssh locking works now