Skip to content

Commit

Permalink
Test 2 with MFA
Browse files Browse the repository at this point in the history
  • Loading branch information
akanuri9 committed Dec 20, 2024
1 parent 03441c9 commit c3ca9f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test-mfa-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ jobs:
User $SSH_USERNAME
Port $SSH_PORT
IdentityFile ~/.ssh/development.key
sshpass -p '${{steps.get-otp.outputs.AUTH_CODE }}'
StrictHostKeyChecking no
${{steps.get-otp.outputs.AUTH_CODE }}
END
env:
SSH_PORT: ${{secrets.SSH_PORT}}
SSH_HOST: ${{secrets.SSH_HOST}}
SSH_USERNAME: ${{secrets.SSH_USERNAME}}
SSH_KEY: ${{secrets.SSH_KEY}}

- name: Test SSH
- name: Connect to SSH and send verification code
run: |
ssh development 'ls -la'
ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i ~/.ssh/development.key $SSH_USERNAME@$SSH_HOST -p $SSH_PORT "echo ${{ steps.get-otp.outputs.AUTH_CODE }} | Verification code:"
env:
SSH_HOST: ${{secrets.SSH_HOST}}
SSH_USERNAME: ${{secrets.SSH_USERNAME}}
SSH_PORT: ${{secrets.SSH_PORT}}
SSH_KEY: ${{secrets.SSH_KEY}}

0 comments on commit c3ca9f7

Please sign in to comment.