Secure way to run `sudo` commands in Azure Devops SSH Task
问题 I have to run few commands in Azure VM through Azure Devops release pipeline. I created SSH step and can successfully connect to remote VM. But having trouble running commands which requires sudo permissions. e.g systemctl restart <some service> errors : ##[error][sudo] password for ***: ##[error]Command failed with errors on remote machine. i tried echo <password> | sudo -S systemctl restart <some service> . No luck. What is secure way to accomplish this? 回答1: The only way to I was able to