Cuando sacudes manos con alguien, debes mirarlo a los ojos.

It is possible to sacudir la cabeza to confirm or negate something; however, my Colombian wife says that in this sentence’s context you would use “Cuando das la mano con alguien, debes miralo a los ojos.” Mano should be in the singular form because the normal custom for most people is to extend one hand.