How to run shell script on remote linux server ?
Hello Guys,
Our Scenario is We have shell script which will shutdown the Application gracefully on Remote server and we have installed TC agent on linux host. trying to run the shell script.
We have service account to direct ssh but we cant run that script with the service account instead we need to do a switch user and run the actual shell script which will shutdown application.
The major challenge here is when we are trying to switch the user its asking for password and we need to give it through the parameter.
Please help here to achieve this.
Thanks
Santosh Garole
Please sign in to leave a comment.
Hi Santosh,
You can try using the runAs plugin, which is intended to run commands as a separate user: https://blog.jetbrains.com/teamcity/2017/09/introducing-teamcity-runas-plugin/