1820696 Members
2713 Online
109627 Solutions
New Discussion юеВ

FTP through a Firewall

 
Belinda Dermody
Super Advisor

FTP through a Firewall

I have a temporary project where I need to send files via ftp from a HP9000 to a vendor through a firewall. I would like the script to do it without prompting for a userid or passwd. I know that .netrc and hardcoding is a NO NO, but this is only a temporary situation till they load and configure ssh. The problem is I have to ftp to our firewall and then enter the site info.

EX:
ftp 10.10.10.10
220 InterScan FTP VirusWall NT 3.51 (Stand-alone Mode), Virus scan on
Name (10.10.10.10:jmarrion #here I enter the testusername and site IP. -- harristest@999.999.999.12
then it prompts me for the password and then I am connected.

Is there anyway that I can put all of this stuff into a shell so I will not be prompted or the operator prompted.

I have a HPUX9000 with 11.00 O/
7 REPLIES 7
Arockia Jegan
Trusted Contributor

Re: FTP through a Firewall

Here's the way,

ftp -n 10.10.10.10 << FTP
user harristest@999.999.999.12
put
FTP



Belinda Dermody
Super Advisor

Re: FTP through a Firewall

Arockia: When I enter the -n I get the following, I tried it in the script and on the command line. Without the -n I have no problems from the command line.

aspen:/tmp: ftp -n 10.10.10.10
Connected to 10.10.10.10.
220 InterScan FTP VirusWall NT 3.51 (Stand-alone Mode), Virus scan on
421 Service not available, remote server has closed connection
ftp> quit
steven Burgess_2
Honored Contributor

Re: FTP through a Firewall

Hi

ftp -inv << EOF
open
user
cd /dir
get
bye
EOF

HTH

Steve
take your time and think things through
Belinda Dermody
Super Advisor

Re: FTP through a Firewall

Can not use the -n argument it gives the no connection prompt every time.
Dave La Mar
Honored Contributor

Re: FTP through a Firewall

James -
We use the following format extensively:

ftp -n -v << endl >> ftp.log
open server_name_or_ip_address
user username password
ascii
put file_name
quit
endl


Best of Luck,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Belinda Dermody
Super Advisor

Re: FTP through a Firewall

The ftp server on the firewall is a NT system and it doesnt allow the -n option form the HPUX system. Is there another argument that is acceptable for the NT server, or did the security manager turn this option off
H.Merijn Brand (procura
Honored Contributor

Re: FTP through a Firewall

does passive mode help?
it should be the firts command

# ftp x.y.z.1
ftp > passive
ftp > binary
Enjoy, Have FUN! H.Merijn