我試圖從JenkinsSSH plugin運行sudo命令,但得到了以下錯誤: sudo: sorry, you must have a tty to run sudo 我詹金斯作業需要能夠停止和啓動服務,我是unable to enable the remote user to do it without sudo。 有什麼辦法可以從Jenkins啓用sudo?
看完這個問題後How to SSH and run commands in EC2 using boto3? 我嘗試使用SSM自動在EC2實例上運行該命令。然而,當我這樣寫代碼 def excute_command_on_instance(client, command, instance_id):
response = client.send_command(
Documen