teamcity-deployer-plugin icon indicating copy to clipboard operation
teamcity-deployer-plugin copied to clipboard

Is there a way to pass credential while executing commands requiring sudo with SSH Exec

Open shampoo72 opened this issue 7 years ago • 2 comments

Hi,

Right now this step is just hung waiting for the password input for the sudo command -

sudo systemctl stop tomcat

Is there any way it can be passed through the runner.

shampoo72 avatar May 30 '17 16:05 shampoo72

At the moment, the runner is not interactive: you can not send additional input on the fly. But sudo can receive password from stdin, so using command like

echo myPassword | sudo -S ls /tmp

should do the trick

nskvortsov avatar May 30 '17 16:05 nskvortsov

Thanks. Works!!!

shampoo72 avatar May 30 '17 20:05 shampoo72