1

I've got kali linux from microsoft store.

I wanted to run ./ngrok authtoken <my_authtoken>

but got -bash: ./ngrok: cannot execute binary file: Exec format error

so I tried chmod +x ./ngrok authtoken <my_authtoken> and sudo chmod +x ./ngrok authtoken <my_authtoken>

but either way I get chmod: cannot access 'authtoken': No such file or directory chmod: cannot access '<my_authtoken>'

what should I do? I really need to run ./ngrok authtoken <my_authtoken>

P.S: I want to use blackeye and when I chose the number it downloaded Ngrok

edit 1: I downloaded another version from https://ngrok.com/download and I removed the previous Ngrok in blackeye directory and unziped the new one instead. now I'm getting bash: ./ngrok: Permission denied

edit 2: It's been 12 days with no accurate answer guess I gotta get the real Kali Linux and the problem is the windows version.

Elitheria
  • 65
  • 1
  • 12

2 Answers2

5

Always Google and try to find an answer before you post a question.

Your first error (-bash: ./ngrok: cannot execute binary file: Exec format error) is probably because your trying to run a program made for a different architecture such as x86 or ARM (see https://askubuntu.com/a/648558).

Your second error (chmod: cannot access 'authtoken': No such file or directory chmod: cannot access '<my_authtoken>') is because your trying to run a command from within chmod, you have to chmod the file then run it.

Your third error (bash: ./ngrok: Permission denied) is because you need to chmod the file to an executable before you can run it, and there is no need for sudo unless chmod returns chmod: cannot access '<yourfile>': Permission denied then you should use sudo.

What your should run is:

curl -L https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -o ngrok.zip
unzip ngrok.zip
chmod +x ngrok
./ngrok authtoken <myauthtoken>
TheBotlyNoob
  • 369
  • 5
  • 16
  • 2
    thank you but it didn't work still gives me the "-bash: ./ngrok: cannot execute binary file: Exec format error" and I had searched but like what you answered they don't work and like I said before I know it's not the version I need so I downloaded other versions but still they weren't the one. please read the questions carefully. – Elitheria Apr 02 '21 at 10:43
  • Side note: Use ARM version of Ngrok if building for Nvidia Jetson :-) – AI Mechanic Jun 30 '21 at 15:50
0

this was the only thing that work for me:

curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
bryson
  • 1