Our Kerberos implementation supports three forms of two-factor authentication: TOTP, HOTP, and Yubikey. In addition, Google authenticator can be used, as in the past.
TOTP and HOTP both work with an application on your phone or other device. The application displays a 6-digit number, which you need to add at the end of your password to login.
TOTP and HOTP use slightly different algorithms. TOTP is based on the time. The same code works for about 30 sec. HOTP is based on count. That is, the next number applies no matter when you use it. That means you can generate numbers from HOTP and keep them in your wallet. With TOTP you need your phone with you to login.
There are things to think about before using two-factor authentication. See the section at the end.
For more detailed documentation, see the Redhat one-time password documentation.
What Two-Factor Authentication Will and Won't Protect Against
Two-factor authentiction will help protect against attempts to guess your password. Also, if someone becomes root on a system you use, they can install a key logger and see your password. With a one-time password that doesn't help them very much.
It does not protect you against someone who manages to compromise root on a system you use. Root can (with suitable software) see what you're typing and data in your files, while you are logged in on that system.
Root cannot see the contents of your files if you're not logged in. (Actually, there's a window of up to 10 minutes after you log out when your files are still exposed to root.)
For this reason, If you have sensitive material, it is best to limit your logins to systems used by only a few people. This is one reason we maintain two systems that only faculty can log in to. (Note however that legally sensitive material, such as SSNs and medical information, should not be kept on our systems without special security arrangements.)
Enabling Two-factor Authentication
Two-factor authentication uses "tokens." For TOTP and HOTP, a token is simply an item that shows in your mobile app. The same mobile app can have tokens for many different systems. You can also have more than one token for a system, e.g. one for TOTP and one for HOTP.
To enable two-factor authentication, log into one of our systems. To add a TOTP token, type
ipa otptoken-addThis command will display a QR code. In the phone app, hit the QR icon and use the camera to scan the QR code displayed. This uses TOTP. To add a HOTP token, use
ipa otptoken-add --type=hotpIf you are concerned about brute-force attempts to guess your password, it is somewhat safer to use --digits=8 with the otptoke-add command. The default is to generate a 6-digit random PIN.
Yubikey is a physical device that you carry with you and plug into a USB port. If you have a Yubikey, you can use it with our system. Insert your key, and then type the command
If you use Yubikey, we recommend also using the other type of OTP, since Yubikey won't let you ssh from a non-CS system such as your home computer.
Mobile Device Clients
Clients for TOTP and HOTP are available for many devices. For IOS and Android, look for "FreeOTP" in the appropriate app store. The ipa otptoken-add command will display a QR code, which you scan with the phone application to configure it.
Because the TOTP and HOTP standards are also used by Google authenticator, you can also use a Google authenticator implementation on your device. For devices other than IOS and Android, we recommend looking for a Google authenticator implementation. If you're using DUO for your University account, DUO documentation suggest that the same app can do TOTP and HOTP authentication. (We do not use the actual DUO technology. It's just that their app tries to support standards-based authenticatoin as well as their own technology.)
USING THE CLIENT
FreeOTP on your mobile device will display a 6-digit code. To login, type your normal password, adding the 6 digits to the end.
If you're worried about forgetting or losing your phone, one approach is to add both HOTP and TOTP. Generate several keys using HOTP and keep them in your wallet. Then use TOTP for normal use. If you lose your phone, you can login with the keys from your wallet until you can replace it or remove two-factor authentication. (Use "ipa otptoken-find" to list your tokens, and "ipa otptoken-del UNIQUEID" to remove one.)
You can also set up two-factor on more than one portable device, e.g. your phone and a tablet.