I need to run shell scripts (shutdown scripts for tomcat) with the tomcat user out from a C# .NET application.
I tried with the WinSCP .NET assembly. I can login via ssh
and run commands.
But how to run sudo su tomcat
first with the same password I already used to login the SSH server?
A secure solution would be great (no passwords in log files or bash history)!
Maybe any other solution instead of WinSCP .NET assembly?