Secure a SSH Login with Google Authenticator on Ubuntu 15.04

You can never be too careful when it comes to online security, especially if you’re dealing with highly sensitive data. Adding an extra layer of security to your linux server it can only be a good thing.

This guide works for Ubuntu 14.04, 14.10 and 15.04.

Google Authenticator is a security application which implements time-based security tokens and it’s also known as ‘two factor authentication’. Every time you’ll login through ssh, it will ask you for your username, password and security code which is generated every 30 seconds by the Google authenticator application. This means that even if an attacker knows your username and password, he will still won’t be able to login.

HowTo autologin to a remote server through SSH

Setting up an autologin account to a SSH server could prove a pretty useful thing to do, especially if you work on remote servers quite often. This means that login through SSH won’t prompt you for a password everytime you authenticate, but at the same time, keeps the high security standard of SSH.

Seting the SSH autologin is a pretty simple thing to do, just open a terminal on the computer you are connecting FROM and follow these steps: