I am trying to transfer some files using SCP in a shell script, but I am being prompted for my password on the remote machine.
Can I use expect with scp to enter the password so I don't have to type it in all the time?
You don't. Use a key instead.
Yes, you can.
spawn /usr/bin/scp -l 200 file.ext user@server://path/on/server/
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
5 years ago
2 years ago