Unable to run binary on config folder to control a switch. "Error 126" cannot execute binary file

On my HassOS I’m trying to execute a binary file to be able to control my netgear switch:
nitram509/ntgrrc: ntgrrc (Netgear Remote Control) a command line (CLI) tool to manage Netgear GS3xx switch series. (github.com)

I upload ntgrrc-v0.6.0-linux-amd64 file to config folder.

Then i changed permitions using:
chmod u+x ntgrrc

Then i’m try to use command:
/bin/bash /config/ntgrrc poe set --address=192.168.1.3 --port=5 --power=enabled

but i get error 126 cannot execute binary file

I try file editor addon “execute shell command”, terminal & SSH addon and also home assistant shell_command but with no success.

I try to execute a .sh file and it worked without errors. But with this binary i get errors.
Is there a way to execute this binary using home assistant automation?

Welcome to HA! :slight_smile:
Why use /bin/bash if it’s already a binary?
Did you try

/config/ntgrrc poe set --address=192.168.1.3 --port=5 --power=enabled

?

Hello @VDRainer This is my first post, although I have been dealing with the home assistant for some years. I couldn’t find any answers although it seems very simple to do…

I also try to execute that way:
/config/ntgrrc poe set --address=192.168.1.3 --port=5 --power=enabled

but when run it with home assistant shell_command i get error:
Error running command: `/config/ntgrrc poe set --address=192.168.1.3 --port=5 --power=enabled`, return code: 127 NoneType: None
and when i run it from shell i get:
No such file or directory: '/config/ntgrrc'

I try even this command:
ssh -i /config/ssh/ha_key -o 'StrictHostKeyChecking=no' [email protected] ./config/ntgrrc

but always get:
"No such file or directory: '/config/ntgrrc'"

If i use
ssh -i /config/ssh/ha_key -o 'StrictHostKeyChecking=no' [email protected] /config/test.sh

is working fine even if both files are on the same folder with the same rights.

This executable is running without any problems on my local ubuntu server. I really dont understand what the problem is? Why is so difficult to execute a binary with shell command??