TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: JACK LOBINGIER
from: MARK LEWIS
date: 2017-02-13 12:43:00
subject: SCP script with Python

 On 2017 Feb 13 04:04:46, you wrote to All:

 JL> I have an SCP script that auto completes just fine from the terminal
 JL> window in Pi.  When I use either subprocess or os to try and have it
 JL> run under Python it does not do the file transfer from Pi to my Ubuntu
 JL> machine. What am I doing wrong?  Here is the script:

 JL> from subprocess import call
 JL> cmd='scp -i id_rsa sample.txt jack@192.168.1.103 /home/jack/pi_data'
 JL> call (cmd.split ())

how are you feeding it the password? the password is being requested, isn't it?

)\/(ark

Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it
wrong...
... Well! I'm impressed.
---
* Origin: (1:3634/12.73)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.