055d4cef9c9d5f16ef8402331edeead29a4d47a8
duo-ssh-faq.md
| ... | ... | @@ -4,11 +4,11 @@ |
| 4 | 4 | |
| 5 | 5 | You'll need to register your device with Duo to receive security codes, and can receive these codes by phone call, text message, or Duomobile app. |
| 6 | 6 | |
| 7 | -``bash |
|
| 7 | +```bash |
|
| 8 | 8 | ssh $username@duo-test.sbgrid.org |
| 9 | 9 | Password: [input password] |
| 10 | 10 | Please enroll at $url |
| 11 | -`` |
|
| 11 | +``` |
|
| 12 | 12 | |
| 13 | 13 | Copy the url into a web browser, and follow the prompts to register. |
| 14 | 14 | Please contact us at help@sbgrid.org if you encounter problems. |
| ... | ... | @@ -18,24 +18,24 @@ Please contact us at help@sbgrid.org if you encounter problems. |
| 18 | 18 | The `DUO_PASSCODE` environmental variable can be used to configure the method duo will use for validation: `push` (Duo mobile app), `call` (phone call) or `sms` (SMS text method). |
| 19 | 19 | This can be set on the remote side (for example, in `~/.bashrc` or `~/.cshrc` on `xtal2000.harvard.edu`): |
| 20 | 20 | |
| 21 | -``bash |
|
| 21 | +```bash |
|
| 22 | 22 | # bashrc example |
| 23 | 23 | export DUO_PASSCODE=push |
| 24 | 24 | `` |
| 25 | 25 | |
| 26 | -``csh |
|
| 26 | +```csh |
|
| 27 | 27 | # cshrc example |
| 28 | 28 | setenv DUO_PASSCODE push |
| 29 | -`` |
|
| 29 | +``` |
|
| 30 | 30 | |
| 31 | 31 | Alternatively, this can be set locally by configuring `DUO_PROFILE` in `~/.bashrc`, `~/.cshrc` or `~/.zshrc` *and* by adding a `SendEnv` block to the local `~/.ssh/config`: |
| 32 | 32 | |
| 33 | 33 | |
| 34 | -``bash |
|
| 34 | +```bash |
|
| 35 | 35 | Host duo_test |
| 36 | 36 | Hostname duo-test.sbgrid.org |
| 37 | 37 | SendEnv DUO_PASSCODE |
| 38 | -`` |
|
| 38 | +``` |
|
| 39 | 39 | |
| 40 | 40 | For non-interactive connections (`scp`, `rsync+ssh`), `push` or `call` must be used for `DUO_PUSH`, otherwise they will hang and timeout. |
| 41 | 41 | |
| ... | ... | @@ -43,7 +43,7 @@ For non-interactive connections (`scp`, `rsync+ssh`), `push` or `call` must be u |
| 43 | 43 | |
| 44 | 44 | ### ssh |
| 45 | 45 | |
| 46 | -`` |
|
| 46 | +``` |
|
| 47 | 47 | user@system:~/$ ssh user0@duo-test.sbgrid.org |
| 48 | 48 | Duo two-factor login for user0 |
| 49 | 49 | |
| ... | ... | @@ -57,9 +57,9 @@ Passcode or option (1-3): 1 |
| 57 | 57 | |
| 58 | 58 | Pushed a login request to your device... |
| 59 | 59 | Success. Logging you in... |
| 60 | -`` |
|
| 60 | +``` |
|
| 61 | 61 | |
| 62 | -``bash |
|
| 62 | +```bash |
|
| 63 | 63 | _________________________________________ |
| 64 | 64 | / Welcome to xtal200.harvard.edu user0. \ |
| 65 | 65 | \ You have landed on duo0-test. / |
| ... | ... | @@ -84,7 +84,7 @@ NOTE: |
| 84 | 84 | Email help@sbgrid.org for assistance, questions, or feedback. |
| 85 | 85 | |
| 86 | 86 | |
| 87 | -`` |
|
| 87 | +``` |
|
| 88 | 88 | |
| 89 | 89 | |
| 90 | 90 | ### scp/rsync/sftp |