subprocess python script to ssh to server and run command code example
Example: python how to run code in ssh
stdout = client.exec_command('python -c "exec(\\"' + open('hello.py','r').read().encode('base64').strip('\n') + '\\".decode(\\"base64\\"))"' )[1]