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
  • 84,225
  • 14
  • 89
  • 153
Markus
  • 23
  • 1
  • 3

0 Answers0