0

I have simple bash script:

#!/bin/bash
sudo etherwake -i enp0s31f6 -D -b xx:xx:xx:xx:xx:xx

I have set also SUID bit and root as owner:

-rwSr-xr-x 1 root root 64 Aug 19 04:23 startPC.sh

If I run it from terminal as normal user, it execute normally. When I run it from SSH command as parameter, it asks for password for sudo:

ssh lukas@server 'Scripts/startPC.sh'
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

Is there any way how to work around this? Thanks!

0 Answers0