SFTP Transfer Across Multiple Servers


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SFTP Transfer Across Multiple Servers
# 1  
Old 05-20-2008
SFTP Transfer Across Multiple Servers

Hello everyone,

Have a question which I'm not entirely sure about, but will ask anyway.

We have three servers (A/B/C), 'A' being the local host, 'B' being a SFTP server on the DMZ, and 'C' being the intended remote host. The task is to transfer file/s from server 'A' to server 'C' via server 'B'.

Now I can already hear people asking why not just go from server 'A' to 'C' directly. That'd be great, however due to existing security policies & practices which are in place on both hosts ('A' & 'C'), and an obligation to maintain PCI security requirements; this isn't possible.

Hence the SFTP server (server 'B'). It's a windows platforn (don't razz me) running WinSSHD. Have already performed sftp connectivity testing from server 'A' to 'B' successfully. So no issues there.

The logistics issue (more understanding really) for me is that server 'B' cannot under any circumstances retain any received file for any time longer than is necessary (Business and Security request).

So how best should I monitor files on server 'B' coming from server 'A' and then commence an SFTP to move the file to server 'C' ??
My initial thought was to monitor for the existance of the file and then execute a predefined sftp batch script.

No problem I initially thought, but what would happen if the file was still in the process of uploading from server 'A' when server 'B' identifies the existance of the inbound file. If it tries to execute the sftp batch before the upload from server 'A' is complete it would/could cause issues.

Is this an issue or am I over reacting here ?? Smilie

A possible alternative was to have two(2) files sent across from server 'A', the first being the "required" file, the second being a trigger. Server 'B' would monitor for the trigger file, then execute the sftp batch script upon the existance of the trigger and "required" files.

I do wish I had the time available to tinker with this, however like many projects, the Operations side is left to the last minute to be advised of what is required - and even then it's flakey.

Hope I've been able to keep everything clear.
Any recommendations / suggestions appreciated.

Cheers,
Cameron
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Execute a script after SFTP transfer

Hi All, I am having an issue with the script execution. I am having a SFTP process that send files to a location . I want to execute a script once it transfer the file to that location. Right now I am leveraging autosys file watcher to do that. Is there any way like MFT PPA that can execute... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

2. Shell Programming and Scripting

File transfer using SFTP

Hi, I want to a transfer file from remote machine to a local machine using SFTP where both my local and remote machines are Ubuntu machines.So i wanted to write a unix bash script which uses SFTP command to transfer the file from remote to local machine. My remote server is 178.28.30.106. ... (14 Replies)
Discussion started by: shree11
14 Replies

3. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

4. Solaris

Need to transfer files between 2 UNIX servers, with same folder permission

I need to transfer directories/files between 2 Unix servers, with same folder permission. I tried scp, but it retains the the permissions, but changes the owner of the directory/file to the user used to copy them to the destination. I don't want that to happen. If possible without any other... (6 Replies)
Discussion started by: Pandee
6 Replies

5. UNIX for Dummies Questions & Answers

SFTP transfer does not complete

I am able to connect to a site and start a file transfer via SFTP, but when the file reaches "100%" -- the file does not complete and "stop". The 100% transfer status does not change (obviously), but the timer for SFTP keeps going and will not complete. This also happens when I try to get a file.... (2 Replies)
Discussion started by: loganban
2 Replies

6. Shell Programming and Scripting

SFTP to transfer files from one server to another

Hello, i have to write a script to perform sftp from the remote server to another server. the files which are at the remote location are huge data log files which should be transfered to my server in a particular folder. could you please provide me the general code (simple )... (1 Reply)
Discussion started by: urfrnddpk
1 Replies

7. Shell Programming and Scripting

Transfer between servers with intermediary

I need to FTP the file from A to C server via B server. So first I connect to B server and then from B I connect to c server and put the files but some how I am getting error. I am able to do this process manually but with the shell script I am able to connect to B server but not to C server .... (0 Replies)
Discussion started by: balakrni
0 Replies

8. Shell Programming and Scripting

file transfer between two servers

Hi Frdz, Can any one help me out. I have a issue like below.i have to write shell script in unix. Server1 server2 ====== ======= 1.txt 1.txt 2.txt 3.txt I have to copy the files from server1 to server2 only... (6 Replies)
Discussion started by: KiranKumarKarre
6 Replies

9. Shell Programming and Scripting

sftp file transfer

hi i am trying to login to remote server using SFTP Protocol and trying to upload a file butit is asking for the password. Note: I am trying to connect to FrontEnd server sftp SFTREGUP1@14.71.26.6 Connecting to 14.71.26.6... Password Authentication Password: Please help (14 Replies)
Discussion started by: Satyak
14 Replies

10. UNIX for Advanced & Expert Users

sftp command for file transfer

hi, I need to sftp a file from one unix system to another unix system. eg: filename is test.txt servername : abc@xyz please give me the sftp command for that. thanks in advance.. mohan.p (2 Replies)
Discussion started by: mohanpadamata
2 Replies
Login or Register to Ask a Question