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 am trying to write a script which will essentially copy and file in a certain folder to a folder on another computer. My first thought was SCP, but I don't know if I can automate SCP by adding a password to the command(from what I have heard this is not possible, or very difficult).

So basically I am trying set up a folder on a mac or linux box which will accept files without prompting for a password (or it can get a password which I can send through a script).

I am sure there is an easy way to do this right?

share|improve this question

migrated from Apr 3 '11 at 22:10

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

You can use scp/rsync etc with keyfiles so they don't prompt for a password (this is the better way of using them)

share|improve this answer

Your first thought was correct. If you set up the ssh keys on the various machines, you can scp (and ssh) with no password needed at all.

share|improve this answer

You can use scp with ssh key authentication, or you could setup rsync and limit access by IP.

share|improve this answer

You must log in to answer this question.

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