Server Fault is a question and answer site for system and network administrators. 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'm looking for a simple backup solution. My hoster has provided some backup space on remote server over scp/sftp. They have supplied me a username and a password. The option of auth with a RSA/DSA key is not avaliable.

Ideally, I'd like to have a simple script that would:

tar | gzip | gpg | scp -uuser -ppassword my.backup.server

However I can't find an scp client that would accept username and password on command line and stuff to transfer on standart input.

share|improve this question
Honestly, I'd ask them for the ability to use (and require) key-based authentication. More secure for you, and therefore more secure for them. If they can't/won't do it, there's other, better hosting providers out there. – mattdm Dec 15 '10 at 15:50

If you're on windows, then WinSCP can be scripted. If you're on Linux (or Windows, too) you can find or install Expect, which can script anything interactive.

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.