Execute Linux service commands using Python? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 5

Execute Linux service commands using Python?

I need to ssh to a Linux server as a normal user and execute service command (with sudo privileges).I need to do this using a Python script, and also need to bypass the sudo credentials which the Linux shell will ask when executing sudo commands. Can anyone help me out?

21st Nov 2017, 1:56 PM
Vamsee
Vamsee  - avatar
1 Réponse
21st Nov 2017, 2:27 PM
AgentSmith