VMware Labs released a new Fling called ESXi Google Authenticator. The download is available as VIB package. If you want to make adjustments it is also possible to download the source code.
Quote taken from the Fling page:
Google Authenticator is a project that provides two-factor authentication by using both a PAM (Pluggable Authentication Module) module and a mobile application for generating one-time passcodes. In ESXi Google Authenticator, we modified the source code of Google-Authenticator to enable two-step authentication on ESXi (5.0, 5.1).
- Two-Factor Authentication for ESXi Shell and SSH access
- Supports multiple administrators login on esx5.1, and single admin (root) on esx5.0
- Support for 30-second TOTP codes
- Support for emergency scratch codes
- Protection against replay attacks
You must have ESXi 5.0 and higher.
There are 7 steps which you will have to follow. You can find them on the instructions page.