Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 hope this isn't a duplicate question, I did do some research on this before posting.

I have several directories locally, which I need to scp over to several remote machines (1 dir per remote machine). Currently, this is how I do it:

scp d1 remote1:/location1/ && scp2 d2 remote2:/location2/ && ...

The problem is that scp asks me for my password for each machine. Normally, I would solve this by adding my local public key to the remote machines, but since there are about 100 of these remote machines, I don't feel like that is a very attractive option.

Is there a way by which I could supply my password at most once to scp all these dirs to all the remote machines?

Thank you

share|improve this question
up vote 0 down vote accepted

If you're not too worried about exposing your password in plaintext on your local machine check out and -pw flag

share|improve this answer

Your Answer


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.