Transfer between servers with intermediary


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Transfer between servers with intermediary
# 1  
Old 07-20-2010
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 . It is just waiting at FTP prompt after connecting to B?
I hope you got my requirement and pasting the script what I have written..
Please put some light on this? Thanks!
Code:
#!/bin/sh 
echo "starting execution" 
BASEDIR=/u01/app/Informatica/staging/dev/infa_shar ed/TgtFiles 
CUR_DATE=`date +%Y%m%d%H%M` 
cd $BASEDIR 
#echo "directory changed" 
HOST='ftpgate0.mot.com' 
echo $HOST 
USER='CWNH63' 
echo $USER 
PASSWD='moto$2010' 
echo $PASSWD 
echo "Variable defined" 
ftp -n $HOST 
quote USER $USER 
quote PASS $PASSWD 
echo "connected to ftpgate0" 
echo "Variable defined" 
user email@removed mcmtech69 
echo "password given" 
echo "connected to MCM dev server" 
cd /MAAM 
put FCST_USER_DATA_ONE_LEVEL.DAT 
echo "File FTPd" 
bye

Regards,
Niranjan .

Moderator's Comments:
Mod Comment Please use a more meaningful subject in the future, and wrap [CODE] tags around your code

Last edited by pludi; 07-20-2010 at 08:44 AM.. Reason: Multiple corrections
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

File transfer

When using FTP to transfer a file from IBM iSeries family of servers client to a non IBM Iseries family server, files might have characters appear in the wrong format Eg | in Iseries and while transferring fro Iseries system to Linux , but instead of | it is showing as ?. Please advise (3 Replies)
Discussion started by: sudhainit
3 Replies

2. 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

3. Linux

How to transfer files...

Hi guys, ok so, how do you go about networking between Windows and Linux so that I can transfer files between each other? (5 Replies)
Discussion started by: billcrosby
5 Replies

4. Solaris

Data Transfer

We have a data on the disk that was copied from HP N4000 running HPUX 11.11 and it was created with vxfs version 4. We need to transfer this data to Sun server, how might this be done? (2 Replies)
Discussion started by: Kjons76
2 Replies

5. 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

6. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: Cameron
0 Replies

7. UNIX for Dummies Questions & Answers

paralink transfer

Hi Everyone, I am trying to transfer the complete contents of an old IBM PS/2 77 486 with AIX aixps2 1 3.0 i386-using a parallel cable connected to a newer pc. I tried using a program called ghost but it didn't copy everything. can anyone tell me a way to copy everything using this type of... (0 Replies)
Discussion started by: greystoke
0 Replies

8. Solaris

ftp transfer

Hi ....I'm trying to ftp 2 pkgs SUNWqlc & SUNWqlcx since they were accidentally deleted from my servers. For one reaseon or the other my server is not loading the cdrom, so I mounted the cdrom on a differernt server & ftp's to it. I tried to get this pkg using the bin & I get an error message... (3 Replies)
Discussion started by: Remi
3 Replies

9. UNIX for Dummies Questions & Answers

How to transfer files

please help me to transfer files from one server to another one i am having problem in it thanks (1 Reply)
Discussion started by: pankaj001np
1 Replies

10. UNIX for Dummies Questions & Answers

How to transfer files

(0 Replies)
Discussion started by: spoonman
0 Replies
Login or Register to Ask a Question