0

I want to copy files from a source to a target unattended via bash script. I do have options to use sftp, ftp over SSL, rsync, WebDAV, CIFS

I do not have the option to install a SSH key pair on the target side (Strato HiDrive), so scp and sftp won't work, do they?

I have read about a scp -W option to store the Password in a file, but can't find some detailed information about…

any ideas?

printminion
  • 2,988
  • 1
  • 26
  • 30
Viktor
  • 623
  • 4
  • 10
  • 25
  • do you plan to do this once? or need to do it many times? is the goal to keep a new copy each time you run the script or to update the existing copy of the data? – Jason Lewis Jun 11 '14 at 04:52
  • i do need this many times and the goal is to keep two copies (if one fails, i do have an other) – Viktor Jun 11 '14 at 09:42

1 Answers1

0

I think you have two questions here.

Q1 is how should you keep a copy of your files on a remote server. The answer to that is rsync over ssh.

Q2. how to supply a password to ssh when you can't put your key on the remote server. This is answered here:

how to pass password for rsync ssh command

Hope that helps.

Community
  • 1
  • 1
Jason Lewis
  • 147
  • 11