This is great... I'm going to be using this in a few weeks. One thing worries me: is it possible to hide the password in the script file so that no one can see it, although it still runs without user input? I ask because there is more than one root user on this machine. On 17 Sep 2001, dog@intop.net wrote:
you need to use an expect script. what you would do is create two scripts, (I would use scp rather than sftp) and have the expect script call the first script that actually copies the files.
example
expect script ----------------------------- #!/usr/bin/expect spawn /path/to/first/script expect "password:" send "yourpassword\n" expect eof ------------------------------ other script (the one that actually copies file) ------------------------------ #!/bin/bash scp filestocopy user@server.domain.com:/home/user -- noodlez: Karol Pietrzak PGP KeyID: 0x3A1446A0