FTP Quote - will it work?!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP Quote - will it work?!
# 8  
Old 02-21-2011
Quote:
Originally Posted by mcclunyboy
Source Server = Solaris 10
Destination Server = Solaris 9

I have root access to both servers.

I will be transferring 1 file from to destination from source, then I need to move that file from the destination to another windows server (FTP already in place for that part, that is why I would like to remotely activate that script)

what do you mean by sell version?
I'd suggest looking into ftp's "proxy" command - Sun's "ftp" does support 'proxy':
Code:
     proxy ftp-command
           Executes an FTP command on a secondary control connec-
           tion.  This  command allows simultaneous connection to
           two remote FTP servers for transferring files  between
           the  two servers. The first proxy command should be an
           open, to establish the secondary  control  connection.
           Enter  the  command  proxy ? to see other FTP commands
           executable on the secondary connection.

Something along these lines....:
Code:
( cat <<-EOF
        open ${FirstHop}
        user ${USRfirsthop} ${PASSWDfirsthop}
        proxy open ${SecondHop}
        proxy user ${USRsecondhop} ${PASSWDsecondhop}
        put File2firsthop
        proxy put File2firsthop
        EOF
) | ftp -n -d -v


Last edited by vgersh99; 02-22-2011 at 07:09 AM..
This User Gave Thanks to vgersh99 For This Post:
# 9  
Old 02-22-2011
thanks that does sound useful.

So "ftp quote" will definately not work and "ftp proxy" is a better choice. From the man pages it seems to do the right stuff. Unfortunately for me it seems I will need to create the scripts from scratch...there is a lot to dowithout any testing yet and only 2 days...

EDIT - it is plain FTP, internal network (basically)
# 10  
Old 02-22-2011
Quote:
Originally Posted by mcclunyboy
thanks that does sound useful.

So "ftp quote" will definately not work and "ftp proxy" is a better choice. From the man pages it seems to do the right stuff. Unfortunately for me it seems I will need to create the scripts from scratch...there is a lot to dowithout any testing yet and only 2 days...

EDIT - it is plain FTP, internal network (basically)
A sample code with 'proxy' should get you started - ironing out the wrinkles shouldn't be too hard.
Post back if/when you get stuck...
# 11  
Old 02-22-2011
does the proxy connection act as an ftp connection from the destination server?

It is refusing the connection (timing out), this can only be the case if the connection is coming from my server. The destination server (i know for a fact) has correct connections to the various other servers.
# 12  
Old 02-22-2011
Please, post the code you're trying....
Code:
A-->B-->C

You're trying to push a file from A to C via B. Correct?
And your 'proxy' connection between B and C (when initiated from A) times out. Correct?
Can you ftp from B to C? Not as a 'proxy', but directly?
Login (telnet/ssh) to B and ftp to C? What happens?
# 13  
Old 02-22-2011
hi,

I am trying via command line before I script it.

I can telnet to B and FTP to C (yes I can directly FTP from B to C), at least connection is fine, I didn't actually move any files.

Commands I am trying, from my source server (A):
Code:
ftp serverB
user  blahblah
password  blahblah
proxy open serverB

As it fails, i don't do anything else. If I use IP Address it just sites there, if I use the DNS name it returns "Unknown Host: or invalid literal address".
# 14  
Old 02-22-2011
From A you should try - make sure your connection to B successful first
Code:
ftp serverB
user  blahblah
password  blahblah
proxy open serverC

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

PING to AIX works but TELNET FTP SSH doesn't work

root@PRD /> rsh DR KFAFH_DR: protocol failure due to unexpected closure from server end root@PRD /> telnet DR Trying... Connected to DR. Escape character is '^]'. Connection closed. root@PRD /> ftp DR Connected to KFAFH_DR. 421 Service not available, remote server has closed connection... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Shell Programming and Scripting

FTP xlsx file doesn't work ...contains wierd characters.

Guys, I've a xlsx file containing pivot tables and my job is to FTP it from one Linux terminal to another. I use the script below : ftp -in xxxx > /ftp.log 2>&1 <<EOT user xxx yyyy binary cd <directory> put xxx.xlsx `basename xxx.xlsx` bye EOT After the file is received in the FTP... (2 Replies)
Discussion started by: bhagat.singh-j
2 Replies

3. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies

4. Shell Programming and Scripting

Replacing Double Quote in Double Quote incsv file

Hi All , We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file XLs data : ... (2 Replies)
Discussion started by: Shalini Badal
2 Replies

5. Shell Programming and Scripting

replacing a quote in some lines with multiple quote fields

i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is 223;25 224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;; 300;X;Event:... (3 Replies)
Discussion started by: wradwan
3 Replies

6. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

7. Shell Programming and Scripting

double-quote inside double-quote

hey all, i made a simple .sh like this: echo "<style media="screen" type="text/css">@import url("main.css");</style>" but the output is: <style media=screen type=text/css>@import url(main.css);</style> i want to keep double-quotes, can anyone help me? thanks (3 Replies)
Discussion started by: indraf
3 Replies

8. Shell Programming and Scripting

Capturing Data between first quote and next quote

I have input file like RDBMS FALIURE UTY8703 'USER_WORK.TEST' .HIghest return code '12' I want to parse data which comed between first quote till next quote USER_WORK.TEST can you please suggest how to do that (4 Replies)
Discussion started by: scorp_rahul23
4 Replies

9. UNIX for Dummies Questions & Answers

FTP doesn't work

Hi! I have 2 servers. The firts has vsftpd server with this configuration: # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all... (2 Replies)
Discussion started by: Torquemada
2 Replies

10. UNIX for Advanced & Expert Users

FTP Server doesn't work??

I appreciate iif anybody can help me with this issue. I set up a Linux FTP server which is authorized user ID from AD. I do some configuration on vsftpd.conf file but it doesn't work out. I copy these configuration, can you help me to check again as when i connect through browser it always give me... (2 Replies)
Discussion started by: cthinh
2 Replies
Login or Register to Ask a Question