Unix Technical Forum

sftp in a script

This is a discussion on sftp in a script within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi, I'm running AIX 4.3.3 and i'm using sftp to send a file. This job is scripted, and is ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 06:12 AM
Dale DeRemer
 
Posts: n/a
Default sftp in a script

Hi, I'm running AIX 4.3.3 and i'm using sftp to send a file. This job is
scripted, and is run as a cron job. I had to install expect, and the job
seemed to run fine with small files. We've gotten up to about 1MB in file
size and now, sftp will stall, and that forces the script to exit.
If I transfer small files, (less than 20k), it works in the script.
If I run it interactively, it works.
Any suggestions on what I can do with this?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 06:12 AM
Bob_M
 
Posts: n/a
Default Re: sftp in a script

On Tue, 16 Nov 2004 11:56:43 -0500, "Dale DeRemer"
<dderemer_nospam@agmc.org> wrote:

>Hi, I'm running AIX 4.3.3 and i'm using sftp to send a file. This job is
>scripted, and is run as a cron job. I had to install expect, and the job
>seemed to run fine with small files. We've gotten up to about 1MB in file
>size and now, sftp will stall, and that forces the script to exit.
>If I transfer small files, (less than 20k), it works in the script.
>If I run it interactively, it works.
>Any suggestions on what I can do with this?
>
>

Sounds like there is a timeout occuring in the expect process.

At the top of your expect script before you fork the sftp session try
adding a line that reads:

TIMEOUT -1

as this effectively disables a timeout.

Let us know if this works?

Bob
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 06:13 AM
Dale DeRemer
 
Posts: n/a
Default Re: sftp in a script

Bob,
Thanks, that seems to work.
Dale

"Bob_M" <r.mariotti@financialdatacorp.com> wrote in message
news:1100752202.fk1JwW3H6e85LWeUhpqgjA@teranews...
> On Tue, 16 Nov 2004 11:56:43 -0500, "Dale DeRemer"
> <dderemer_nospam@agmc.org> wrote:
>
> >Hi, I'm running AIX 4.3.3 and i'm using sftp to send a file. This job is
> >scripted, and is run as a cron job. I had to install expect, and the job
> >seemed to run fine with small files. We've gotten up to about 1MB in file
> >size and now, sftp will stall, and that forces the script to exit.
> >If I transfer small files, (less than 20k), it works in the script.
> >If I run it interactively, it works.
> >Any suggestions on what I can do with this?
> >
> >

> Sounds like there is a timeout occuring in the expect process.
>
> At the top of your expect script before you fork the sftp session try
> adding a line that reads:
>
> TIMEOUT -1
>
> as this effectively disables a timeout.
>
> Let us know if this works?
>
> Bob



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com