Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

All O2 cluster logins from outside of the HMS network require two-factor authentication.

Table of Contents



The Two Factor Authentication FAQ has quick answers to your more specific questions.

...

Code Block
languagebash
#login to o2 normally
DESKTOP:~$ ssh abc123@o2.hms.harvard.edu
Welcome to O2 (Orchestra 2)!
...
[abc123@login06]:~
$ 
# THIS HAS TO BE DONE ONLY ONCE
[abc123@login06]:~
$ echo 'export DUO_PASSCODE=phone' >> $HOME/.bashrc

#CHECK WHETHER .bashrc IS UPDATED
[abc123@login06]:~
$ tail -1 $HOME/.bashrc
export DUO_PASSCODE=phone

#now logout from o2
[abc123@login06]:~
$ logout
Connection to o2.hms.harvard.edu closed.


#NOW, TRY SCP/SFTP/RSYNC
DESKTOP:~/$ sftp abc123@o2.hms.harvard.edu
Connected to o2.hms.harvard.edu.
sftp> quit
quit


#NOW, TRY SSH TO A SERVER
DESKTOP:~/$ ssh o2.hms.harvard.edu
Reading $DUO_PASSCODE...

Calling your phone...
Dialing XXX-XXX-1234...
Answered. Press 1 on your phone to log in.
Success. Logging you in...
Welcome to O2 (Orchestra 2)!
...
[abc123@login06]:~
$

#Note: if you have following command in your .bashrc, the instructions above does not work. You need manually add 'export DUO_PASSCODE=phone" above it. 
[ -z "$PS1" ] && return



Using secure.med.harvard.edu

...