Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
Please don't cross-post. – Dennis Williamson Feb 21 '11 at 11:12

scp /path/to/source destination.machine.address:/path/to/destination

Is what you want? I'm not entirely sure what your problem is. Full scp instructions can be accessed with man scp in your terminal. If you're calling it from a script, you will probably want to set up public/private key authentication so you don't need to enter the password (entering the password from the calling program is doable, but a faff).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .