Introduction to the MARCC grid

From CLSP Wiki
Revision as of 11:57, 1 September 2017 by Hongyuanmei (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Easy login

After setting up two-factor-authorization, we still need to type a 6-digit code every time we login. Here is a trick to walk around it.

First, we access the website below and get YourVerificationCode: https://password.marcc.jhu.edu/?action=qrretrieve#

Create a file named *marcc* in home directory '~' with content:

#!/usr/bin/env expect
set key [exec oathtool --totp -b  YourVerificationCode]
spawn ssh -fNM  marcc
expect "Verification code:"
send "$key\r\n"
set pass YourPassWord
expect "Password:"
send "$pass\r"
interact

Then to login, we just need to type:

expect marcc
ssh marcc

Occasionally, this fails. Then we can do:

ssh marcc
ctrl+c (when asked for verification code}
expect marcc
ssh marcc