Reputation: 11
I need bash script to upload file with SCP. How I can do that in script, I want to call that script fromother program. ( I know to do that with EXPECT but I need plain bash script). Can anybody help ?
Upvotes: 0
Views: 1787
Reputation: 104050
I strongly recommend setting up key-based authentication for your system. Then you could use ssh-agent to automate unlocking the key for your program.
Upvotes: 3
Reputation: 420971
I need bash script to upload file with SCP
Well then just type the scp
command in the file and make it executable.
If you're asking how to avoid being prompted for password, I strongly recommend you to use SSH-keys. Here is a really simple tutorial on how to set it up properly.
Upvotes: 1