Ftp - server to server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ftp - server to server
# 1  
Old 11-04-2005
Ftp - server to server

Hi.

First, I am fairly new to unix scripting (Aix with ksh).
The problem is, I have to transfer a file from a machine A to machine B using ftp. But the script I have to write, needs to be on machine C.

So is there anyway to transfer the files directly form A to B (from C) or do I have to first transfer the file from A to C and then C to B.

thanks..

Rodney
# 2  
Old 11-04-2005
Tricky but not impossible ... you need to do something like run a script on machine C that rsh's or ssh's to machine A and runs your ftp command (Of course you need to setup trust relationships so that this can be done without passwords).

Unfortunately if its more than a single command then you need to have the script on machine A (or transfer it from machine C) even though its run from machine C
# 3  
Old 11-04-2005
The FTP protocol directly supports server to server transfer.
You initiate it with the proxy client command.
Ages ago I wrote a script to automate this:
http://www.linux.ie/old-list/9073.html
# 4  
Old 11-04-2005
pixelbeat, have you tried your script recently? I just tried a 3rd party transfer manually. I got something like this:
ftp> proxy put testfile
servera.abc.com:227 Entering Passive Mode (1,2,3,4,251,85)
serverb:500 Illegal PORT Command

I don't think that many ftp servers still exist that will tolerate a PORT command that specifies a different IP address than the address used to establish the control connection that sent the PORT command.
# 5  
Old 11-07-2005
Nope 1999 was the last time I used FTP.
It truely is an evil protocol.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update/Download file from FTP server to UNIX Server

HI Guys, I want to download files from FTP Server to my Unix server. I have tried , buy No Luck . Below Command i have tried. 1-Wget - Error "wget' not found" 2.ftp -n $HOST ...Not Working. 3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies

2. Solaris

FTP-ing files from Windows server to UNIX server

I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output. Is it possible to transfer files from Windows server to unix server through any shell script? If so can you please help me with the details. Thanks in... (8 Replies)
Discussion started by: ssk250
8 Replies

3. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

4. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

5. Windows & DOS: Issues & Discussions

Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All, I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible. I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies

6. Red Hat

when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys, Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session. I am using RHEL 5.3. root@]# ll total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies

7. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

8. Shell Programming and Scripting

Dowloading a File from FTP Server to a local Server where User Id's are different

Hi, The Setup is like this. I'm connecting to Unix machine from my local machine. After connecting to Unix M/c, i need to connect FTP server. Am successful in connecting to FTP server, but am not able to download the file from the ftp server to my local machine. I have different user id's and... (1 Reply)
Discussion started by: ranjith_taurean
1 Replies

9. Shell Programming and Scripting

FTP multiple files from remote server to local server

Hi, I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies

10. Shell Programming and Scripting

how to move a file from one server to another server using FTP in shell script?

I have a file --> file1.txt i need to copy this file to another server using FTP....the 2 servers are server1 and server2..may i know how to write a script that can do this? thanks in advance! Im a newbie to this... (4 Replies)
Discussion started by: forevercalz
4 Replies
Login or Register to Ask a Question