How do I run a local Python script on a remote server?

Quốc Ân

New member
How do I run a local Python script on a remote server?
Answer
Using the paramiko library – a pure python implementation of SSH2 – your python script can connect to a remote host via SSH, copy itself (!) to that host and then execute that copy on the remote host. Stdin, stdout and stderr of the remote process will be available on your local running script.
 

Tìm kiếm

Back
Top