Follow the steps in the article below to enable two-factor authentication for your SSH connection to your server:
How To Set Up Multi-Factor Authentication for SSH on Ubuntu 16.04 | DigitalOcean