I am trying to run:
ssh name@serverIP "sudo speedtest-cli"
which after I type my password in I get:
sudo: speedtest-cli: command not found
However if I SSH on that mac, then run sudo speediest-cli
, it works.
I have tried putting it in a script doing ssh -t name@serverIP "bash -s" < ./test.sh
, it manages to read the script file ok and connect via ssh but still outputs :
sudo: speedtest-cli: command not found
Any ideas?