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.

  • 2
    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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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