΢ҕl

Menu

Wananga landing Wananga landing
Topic

Google Authenticator

10 July 2024
HOW TO APPLY
Getting setup with Google Authenticator

To login to linux.cosc.canterbury.ac.nz directly (i.e not via ssh.canterbury.ac.nz), you will need to set yourself up with Google Authenticator as the method for Two Factor Authentication. You can use Google or Microsoft's Authenticator app or if you'd rather something free and open source that doesn't violate your privacy like the Microsoft Authenticator app does, you could use Aegis instead.

From a terminal window on any CSSE department Linux desktop computer, run google-authenticator like this:

google-authenticator -D -w 3 -f -t -u -i "CSSE compute server"
CSSE Google Authenticator

Immediately you should see a QR code displayed in your terminal window like the one above, with a prompt asking for a "code from app" underneath it. Using whichever authenticator app you installed, create a new entry and scan the QR code. This will result in a 6 digit code being generated within the app which you should enter at the terminal prompt. In the example above the code from the authenticator app is 814600.

A list of emergency scratch codes will be generated and displayed in the terminal which you should keep a record of. These codes can be used one time each if you loose your phone or it gets broken.

Logging into linux.cosc.canterbury.ac.nz

With your QR code scanned and authenticator app set up you can now login directly to linux.cosc.canterbury.ac.nz as in the following example:

tstark@jarvis:~$ ssh abc123@linux.cosc.canterbury.ac.nz
(abc123@linux.cosc.canterbury.ac.nz) Password:
(abc123@linux.cosc.canterbury.ac.nz) Verification code:
Welcome to CSSE's linux.cosc.canterbury.ac.nz service.
Although considered stable, this system may be rebooted without warning.
This system is monitored for dubious activity.

Last login: Sun Feb 19 14:59:19 2023 from 132.181.14.125
[abc123@cssecs7 ~]$

Above we can see a successful login to linux.cosc.canterbury.ac.nz over a SSH connection. Note that it's normal for both your password and verification code to be displayed as you type them in.

More complex SSH commands can be used together in just the same way as for ssh.canterbury.ac.nz as described here.

If something should go wrong or if you want to erase your configuration with Google Authenticator and try again, simply delete the .google-authenticator file while you are logged into one of the department's Linux computers like this:

abc123@cs24210bx:~$ rm ~/.google_authenticator

If you need any assistance with these remote access instructions please send an email to tas@cosc.canterbury.ac.nz


Return to the main page for CSSE Computer Labs.

Need more help with remote access?

Privacy Preferences

By clicking "Accept All Cookies", you agree to the storing of cookies on your device to enhance site navigation, analyse site usage, and assist in our marketing efforts.