Operating System - HP-UX
1833313 Members
2825 Online
110051 Solutions
New Discussion

Passive FTP with HPUX 10.2

 
mhess_1
Advisor

Passive FTP with HPUX 10.2

I have an older HP workstation running HPUX 10.2. When I try to set passive mode when in an FTP session I get an error. Is there a version of FTP I can use with v10.2 that supports passive FTP?
11 REPLIES 11
Murat SULUHAN
Honored Contributor

Re: Passive FTP with HPUX 10.2

Hi

what kind of errors did you get?

you can try the pureftpd from following url

http://hpux.cs.utah.edu/hppd/hpux/Networking/FTP/pure_ftpd-1.0.8/

Best Regards
Murat
Murat Suluhan
mhess_1
Advisor

Re: Passive FTP with HPUX 10.2

When I type 'passive' during the session I get: "?Invalid command". This also happens when I have the 'passive' command in my .netrc file.

I'll try the pureftp utility.

Thanks,

Mark
Steven Schweda
Honored Contributor

Re: Passive FTP with HPUX 10.2

Are you running an FTP client on the HP-UX
system, or are you complaining about the FTP
server there?
mhess_1
Advisor

Re: Passive FTP with HPUX 10.2

I am running an ftp client on my system and connecting to a server that requires passive ftp. When I connect to the same server using one of my other HPUX machines running HPUX v11.0 everything works fine, but when I try to connect to the same server using my system running 10.2, I get the error when trying to set to passive mode... and then am unable to do simple functions sucg as a 'get'.

Mark
Steven Schweda
Honored Contributor

Re: Passive FTP with HPUX 10.2

> I am running an ftp client on my system [...]

So, knowing nothing, I'd guess that anything
with "ftpd" in its name won't help you.

I've never needed to find a better FTP client
for anything, so I don't have any reliably
good advice, but there might be an HP-UX
patch for 10.20 which included an improved
FTP client, or you might be able to use the
FTP client features in Kermit.

http://www.columbia.edu/kermit/ftpfaq.html

http://www.columbia.edu/kermit/
Steven Schweda
Honored Contributor

Re: Passive FTP with HPUX 10.2

If you're only _fetching_ files, something
like wget could be useful.

http://www.gnu.org/software/wget/wget.html

It uses passive FTP by default:

--no-passive-ftp disable the "passive" transfer mode.
mhess_1
Advisor

Re: Passive FTP with HPUX 10.2

Perhaps I misunderstood your question. I am simply using the 'ftp' command in HPUX - so specific client or applkcation. Yes I only need to pull files, so maybe I'll give one of the utilities you mention a try. At present I use the .netrc file to automate the process, so I'll need to figure out how to do this with another application.
Steven Schweda
Honored Contributor

Re: Passive FTP with HPUX 10.2

> Perhaps I misunderstood your question. I am
> simply using the 'ftp' command in HPUX [...]

I think that we understand each other, but
that first suggestion of pure_ftpd assumed
that your problem was with an FTP server on
HP-UX, not the client ("ftp").

It's likely that more people have questions
about configuring an FTP server on HP-UX than
have questions about using its FTP client
program, and you didn't specify which end you
were on, so it was a predictable error. Many
of the questions on this forum are unclear or
incomplete (like yours), and many of the
answers depend on unjustified assumptions
(like his). (And many of my responses
include questions, and in many cases they
never get answered, but that was not a
problem here.)

> [...] I use the .netrc file [...]

I believe that wget also uses .netrc,
although leaving passwords lying around in a
file never seemed like a good idea to me. I
don't know if Kermit does, but Kermit does
offer a pretty versatile scripting
capability, so many things are possible with
it. At least one of these programs should be
useful. There's also cURL, which I don't use
much, but which may also do what you need:

http://curl.haxx.se/
Bill Hassell
Honored Contributor

Re: Passive FTP with HPUX 10.2

This is a really obscure solution but I finally found it:

quote pasv

Start your ftp session, set things like ascii or binary, prompt, and then type: quote pasv to get passive mode. This should always be enabled for today's Internet environment. Works on 10.x and all versions of 11.xx

There are two commands for ftp, quote and site that are poorly documented, and as they depend on the server's ftp daemon settings, may or may not always work.


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: Passive FTP with HPUX 10.2

> This is a really obscure solution but I
> finally found it:
>
> quote pasv

And you've tested this and seen it cause a
transfer to be done in passive mode? Hint:
Turn on debug info, and look for stuff like:

---> PASV
227 Entering Passive Mode (10,0,0,9,249,232)

instead of:

---> PORT 10,0,0,9,249,234
200 PORT command successful.

If a get/RETR or put/STOR still uses PORT
instead of PASV, then it may be obscure, but
it's not a solution.

> [...] may or may not always work.

A loose [quote] PASV command will never do
what you seem to think that it will do. A
passive transfer is done differently from a
non-passive transfer, and both sides need to
agree on what they're doing to manage it.

I believe that the FTP is described in an RFC
somewhere, reading which can be educational.
mhess_1
Advisor

Re: Passive FTP with HPUX 10.2

Thanks very much for all your help. This site is a great resource. I actually came across a version of ftp (/usr/bin/ftp) that is a slightly newer release than the one I was using and it works in passive mode.

Thanks again for your time.

Mark