Execute a command on Remote Machine in Python
Sure, there are several ways to do it! Let’s say you’ve got a Raspberry Pi on a raspberry.lan host and your username is irfan. subprocess It’s the default Python library that runs commands. You can make it run ssh and do whatever you need on a remote server. scrat has it covered in his answer. … Read more