How can I read data from a big remote file using subprocess and ssh?
import subprocess
ssh = subprocess.Popen(['ssh', 'user@host', 'cat', 'path/to/file'],
stdout=subprocess.PIPE)
for line in ssh.stdout:
line # do stuff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With