Search code examples
command-linengrok

Auth on ngrok event not found


I'm trying to auth on ngrok:

aaas-iMac:sss aaa$ ~/ngrok -authtoken bbtw942UevV!Ap94JzFz 80
-bash: !Ap94JzFz: event not found

What's with this? How do I auth? Thanks.


Solution

  • Your token has an un-escaped exclamation mark (!) in it, which is being interpreted by bash as a command history expansion.

    You need to escape it by enclosing the authtoken in single quotes:

    $ ~/ngrok -authtoken 'bbtw942UevV!Ap94JzFz' 80
    

    Alternatively, escape it with a slash:

    $ ~/ngrok -authtoken bbtw942UevV\!Ap94JzFz 80