How to run "sudo su tomcat" from a .NET application -


i need run shell scripts (shutdown scripts tomcat) tomcat user out c# .net application.

i tried winscp .net assembly. can login via ssh , run commands.

but how run sudo su tomcat first same password used login ssh server?

a secure solution great (no passwords in log files or bash history)!

maybe other solution instead of winscp .net assembly?

the sudo/su made not automatable. reason.

so solution dirty , unreliable hack.

if need able allow automatic run of command, allow run without password in sudoers. that's correct , transparent solution.


Comments

Popular posts from this blog

javascript - How do you prevent nested queries/catches in sequelize? -

java - Could not retrieve pre-bound Hibernate session - Could not obtain transaction-synchronized Session for current thread -

ruby on rails - ActiveRecord order not working -