I need to write a python script where I send files to a remote machine, then perfom some operation on them (again with python) and then send them back to my local machine using paramiko, but I haven't able to do that, It just doesn't do anything after I try to connect back to my local machine
On my local machine, I got this
client = paramiko.SSHClient()
client.load_system_host_keys()
client.connect(hostname=IP, username=usrname)
stfp_client = client.open_sftp()
stfp_client.put(source_path, des_path)
stdin, stdout, stderr = client.exec_command("python3 /home/scripts/main.py ")
And on my remote machine, after I perform some operations to my files I got the same code except that the ssh and sftp connection is from my remote to my local machine, but it doesn't send anything, I already debugged it and on the remote side it gets until the client = paramiko.SSHClient()
so I wanted to know what am I doing wrong or another way to perform this task.
Thank you in advance and I'm sorry for my bad english