Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neil-sabol/d00d1da2bbc7ad2c57b4cd6725ca873f to your computer and use it in GitHub Desktop.
Save neil-sabol/d00d1da2bbc7ad2c57b4cd6725ca873f to your computer and use it in GitHub Desktop.
See https://blog.neilsabol.site/post/yubikey-personalization-tool-yubico-powershell-command-cli-program-random-static-password-commandline/ . This snippet uses the ykman command to generate a new static password on the Yubikey.
# Create an alias for ykman pointing to the install location
set-alias ykman "$env:programfiles\Yubico\YubiKey Manager\ykman.exe"
# Run ykman to generate a random static password in Yubikey's config slot 2
ykman otp static 2 --generate --length 16 --force --keyboard-layout US
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment