to further what Mara said, you can execute a command through ssh. for example:
ssh user@SERVERB '(cd /etc; cat fstab)'
will ssh in, do the stuff in quotes, and log out. So... if you setup public key authentication, from server A, you coud simply:
ssh SERVERB 'ncftpput -u user -p passwd -S .tmp -V -m SERVERC dest_dir file'
assuming "file" lives on SERVERB. If it doesn't, you can tar over ssh as well, and in the same ssh session as the untar, you could execute the ncftpput command
There are other alternatives to ncftpput... I believe there's ftpupload (Debian based) and... well, I'm sure several others.
edit: I'll go ahead and give you the tar command in case you need it - it would be something like (assuming the script and file were on SERVERA:
tar cf - file | ssh user@SERVERB '(cd /some_dir; tar xf -; ncftpput -options SERVERC dest_dir file)'
Last edited by BrianK; 06-22-2004 at 04:04 PM.
|