tomaswolf commented on issue #658:
URL: https://github.com/apache/mina-sshd/issues/658#issuecomment-2630527629

   > Basically my use is that, I want to run command. su rm "abc" it will wait 
to get password and I need to provide password programmatically without 
creating shell. How can I achieve this?
   
   I presume you mean `sudo`, not `su`.
   
   First, be aware that Apache MINA sshd has no privilege separation, and is 
not tied into the Unix user management. The command will run with the user that 
is running the server.
   
   Regarding `sudo` itself, I see two possibilities:
   * Configure `sudo` on the server side such that the user can run this 
precise command (`rm "abc"`) password-less, or
   * Use `sudo -S` and pass in the password via stdin 
(`channel.getInvertedIn()`).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to