简体   繁体   中英

Upload file with SCP bash script

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 ?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM