Skip to content

Instantly share code, notes, and snippets.

@GregoryWiltshire
Last active July 12, 2020 22:34
Show Gist options
  • Save GregoryWiltshire/c061e9fa4d0565dbfeb6bf0bdedf6ca4 to your computer and use it in GitHub Desktop.
Save GregoryWiltshire/c061e9fa4d0565dbfeb6bf0bdedf6ca4 to your computer and use it in GitHub Desktop.

Dependencies:
brew install stoken

  1. Click on the RSA link in your email and copy the 'ctfData' string value from the address bar and use it with the command below:
    stoken import --token='com.rsa.securid://ctf?ctfData=YOUR-CTF-DATA-HERE'

  2. Enter your PIN as your password

  3. Get your Device ID or 'Binding ID' from your RSA ID app on your mobile device under the info tab, long pressing over the id also will allow you to share it to yourself.

  4. Enter the device id if the app asks for it..

  5. You now have stoken configured!
    You can use a function similar to this to now generate your RSA string from your shell to your clipboard.

rsa ()
{
  vared -p 'RSA PIN: ' -c pin
  printf '\n'
  printf '%s%s' "$pin" "$(stoken --stdin <<<"$pin")" | pbcopy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment