0

I'm trying to a copy file from my raspberry pi to my computer with scp and automate it with expect.

My current sollution looks like this:

#!/usr/bin/expect

exec scp pi@ip_address:/home/pic.jpg pic.jpg

expect "*assword: "
send "raspberry\r" # Password to raspberry pi

The first line works fine. However, the password does not get passed and I have to type it manually.

Would be thankful if somebody could help me!

Cyrus
  • 77,979
  • 13
  • 71
  • 125
Markus
  • 3
  • 2

0 Answers0