Yaroslav Bulatov
Yaroslav Bulatov

Reputation: 57893

Python subprocess that asks for password

I'd like to call scp from Python script. subprocess.call doesn't work because scp asks for password. Someone asked same question last year and the answer was to use Pexpect.

Is there some quick hack for this that doesn't involve installing Pexpect library?

I tried echo password | scp ... and it still asks for password

Answer update:

Making key-pair got the job done, following instructions here

Upvotes: 1

Views: 978

Answers (1)

Sasha
Sasha

Reputation: 326

Given that you don't want to use Pexpect, why not use a key pair?

Upvotes: 2

Related Questions