this does not capture distinguish the case where ssh fails because the host crashes during the update you should be able to catch that case with code like this result e args if result exit status this is an ssh failure  not an update engine failure