Skip to main content

YubiKey: Disable or enable ‘Enter’ after OTP or OATH-HOTP

By default, YubiKeys arrive with OTP enabled on slot 1 and it will send an ‘enter’ after the code is entered. Sometimes you touch the YubiKey by accident and you send a form or a message … seasoned with the OTP.


You have two options:

  1. Swapping the OTP to the second slot. Download and install the YubiKey Manager from Yubico: the application and make sure the YubiKey is plugged in.
    Switch the Slots, this is the result:
    Now you have to tap & hold (around 2 seconds) your YubiKey to insert the OTP.

  2. Disable that the ‘enter’ is sent. Afaik you only can do that with the (no longer officially supported) YubiKey Personalization Tool or with the YubiKey Manager CLI.Disable that ‘enter’ is being sent for slot 1:
    ykman otp settings --no-enter 1

    Enable it again:

    ykman otp settings --enter 1


Leave a Reply

Your email address will not be published. Required fields are marked *