Client-server application for logging running processes
SERVER_1_PASS = os.getenv('PASS_1') or &quot;&quot;
SERVER_2_PASS = os.getenv('PASS_2') or &quot;&quot;


I don't think it's a good idea to pass secrets in the environment - that's too easily read by other processes.  Instead, prefer to hold them in a file that's accessible only by the user.  Since we're using SSH, we even already have such a file ($HOME/.ssh/config), though a better choice would be to use public-key authentication.

ssh.connect(SERVER_1, username='root', password=SERVER_1_PASS)


Ouch - why to we need to connect as root?  We should have a dedicated user for this, with the minimum level of capability to perform the task.
What does connect() do when SERVER_1 is the empty string (our default if not passed in environment)?  Is that what we want, or should we error out in that case?