How can you prevent a Man-In-The-Middle attack?

Technical