I am trying to use a .sh script on Windows 10 (through Git Bash) to restart my nginx server.
This is what I'm trying
$ ssh myname@myserver 'sudo /usr/sbin/nginx -s reload'
sudo: Command not found.
I'm not sure why this happens, I know sudo
isn't defined in Git Bash but shouldn't the command execute on the server? When I ssh
in manually and run the same command it works:
$ ssh myname@myserver
$ myserver:/home/myname[ 51 ] --> sudo /usr/sbin/nginx -s reload
Password: