sftp scripting

I am totally new to this forum so if I am asking this and it has already been asked I apologize, but I have yet to have time to figure out how to search effectively for answers in previous posts. I'll figure it out tomorrow I just wanted to get this out there in case there is someone with this knowledge just bubbling out of their head aching to share it.

ANYWAY:

I am trying to script an sftp cron job. My first hurdle was to get key authentication working so I wouldn't have to deal with the issues surrounding giving it a password from within a script. That was fun, and it works now. I was trying to treat it like ftp and use the EOF arguments to get it to read the commands but it is not working. Do I have to use a batch file to send commands to sftp in a script? If so does anyone know where I could get some examples of how to do that (ie make a batch file). Or if I don't have to use a batch file could someone point me toward some examples of how to script commands for sftp.
Thanks in advance,
New_Guru

See scripting sftp - their example should get you going.

I figured this out on my own before I had a chance to come back and check here again for a response. But thanks anyway, I was beginning to think this was one of those boards full of :mad: stuck up people :mad: who never answered the "new guys" questions. Glad to see it isn't.
Thanks again. :slight_smile:

We love new guys here.
In the future, if you figured something out, don't forget to post back what you did so you can help the next "new guy."

To expand on dangral's remarks, the reason for the meager response is that we don't seem to have users with much experience in scripting sftp. When RTM mentioned that excellent link, I linked this thread to ftp scripting faq. We always appreciate it when a user who solves his own problem posts that solution here for the benefit of others. But that is especially true of this thread.

Absolutely ! You are indeed with the best group.

What was the solution you came up with? I have a similar need and have not found any way to get this working.

Please post your script. Thanks