Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Apr 3 '11 at 22:10

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

3 Answers 3

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)

http://blogs.oracle.com/jkini/entry/how_to_scp_scp_and

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.