I am working on a project, which sends an image with to an Amazaon EC2 Instance via SCP and process the image via executing a python script inside the instance via SSH. The script has a return value in list type. How can i keep this value as a variable via Python in Client-Side. Sending the images via SCP and SSH is also done in a python script in Client-Side.
os.system(f'cmd /c "ssh -i pem-file.pem {instance} ./processing {image}"')
Thanks in Advance !
try to read and use paramiko lib for ssh with python, you will find it easyer to get response back from the server directly to your script and not to the os.
paramiko site
2.1m questions
2.1m answers
60 comments
57.0k users