Elitheria
Elitheria

Reputation: 65

"./ngrok authtoken <my_authtoken>" not working

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.

Upvotes: 1

Views: 9880

Answers (2)

bryson
bryson

Reputation: 1

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

Upvotes: 0

TheBotlyNoob
TheBotlyNoob

Reputation: 368

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>

Upvotes: 4

Related Questions