0

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 ?

1

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.