TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARK LEWIS
from: JACK LOBINGIER
date: 2017-02-13 11:42:00
subject: Re: SCP script with Pytho

On Monday, February 13, 2017 at 12:15:14 PM UTC-6, mark lewis wrote:
> 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.

I went through the key-gen process to generate a private and public key.  That
is what the "id_rsa" is part of the command is looking at, so yes, it does auto
complete without manual password entry.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

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™.