How create FTP script on UNIX (HP) to send a file with encryption, SSH, Kermit, etc...

As of today, we have a customer (receiving point) that would like us to FTP (we send) the EDI files (ship notices) across the Internet.

On our side we have an HP-UX UNIX box. I believe the customer has Windows
2000 on the other end. If forced we could use a Windows box as the sender.

The customer would like us to FTP a file to them on a periodic basis over the
Internet. I have no issue with this.

*We also need to do this in an Unattended mode or on a schedule.

*My issue is one of security--how can we send a Secure FTP, with SSH, Kremit, SSL, etc.?
-I know nothing about how to do this or configure this, including any software we will need.
-I do know how to send a file via FTP though a command line.
-I also know how to set up an FTP server but doubt we will need that on our end as we are the sender and I hope we can get by without such.

But perhaps you have some comments on the above and below.

1. Do we use Kermit on our end to send from our Unix box?

2. Do we use SSH or something else?

3. How do we set these up on our end?

4. Then how do we do encrpty the file and send it in an unattended mode on a scheduled basis (perhaps through a CHRON job on UNIX (HP))

5. How do they (the receiver on Windows) unencrypt it?

6. What do they need on their (Windows) end in terms of software to handle our transmission?

Any other options of ease and low cost with security?

Another Scenario
We were told that a possible option is to consider sending the file
from our Unix or a Windows box on our end via SSL over the Internet
(instead of FTP).

BUT>>>>>>>>>>>>>>>>>>>>>>>We have no idea how to do this in an
unattended mode on Unix or on Windows.

In other words I have no clue if this is even possible in concept in a
batch or scheduled mode....................

Thanks for your time

Respectfully, Peter
Who is Participating?
1:  Both parties get PGP software (or GPG [], since PGP is no longer available for commercial use), both parties create keys, both parties exchange keys.  When sending a file, the file is encrypted/signed with GPG, sent, and then decrypted on the other side.

2:  S/MIME is very similar to PGP/GPG except that you purchase X.509 keys from Verisign, generate them with the Apache key generator, or some such, and you use slightly different softwrare (verisign sells this software, but there's also free software available).

3:  You don't need a web browser to talk HTTP.  There are several Perl modules on that can do this, and there's also wget/wput, which is a command-line interface to HTTP and FTP.

HP-UX binaris for wget are available from, but this doesn't really help.

wput, which has been renamed winie, is Java based and is available from  The site doesn't say for sure that it supports SSL, but I'd be extremely surprised if it doesn't given that it's from the w3c.

4:  See 3: for pointers to download locations.  Easiest way is probably going to depend on what the other side can do.  All can be done for zero cost.  Hmm, and my original post totally forgot another option which is sftp (SSH version of FTP).  Free version of this would be to use OpenSSH on both sides (
FTP is totally insecure by itself.  If you're going to send things via FTP, then you should encrypt the payload with something like PGP or S/MIME.

Sending via HTTP/SSL is probably going to be easier.  There are various Perl modules ( that talk HTTP, and you can combine these with OpenSSL to talk HTTP/SSL.

There's also the W3C's wget/wput, which is a command-line interface to HTTP/HTTPS.
pacummingAuthor Commented:
Can you elaborate on the above in terms of the below, keeping in mind we need to run unattended and that we do not have a web server or browser on the sending box. If we need one we can get one.

1. How PGP would work. The process.
Is it-get PGP software. Encrypt the file, then FTP it?
They unencrypt it?

2. How would S/MIME work and what is needed in terms of software, scripts, etc.. on both ends.
I thought S/MIME was an Internet protocol so I am dumb when it comes to how to send data over the Internet without a browser on your system. Not sure how this could work unattended on UNIX or Windows.

3. Probably this is related to the above when you perhaps "Sending via HTTP/SSL"--again how do this on an HP UNIX box that has no web server or has any browser on it. Of course it does have IP access to the Internet and we can FTP anywhere. Thus it is exposed to the Internet.

4. I will look into this but perhaps you could elaborate while I go look at W3C on this:
There's also the W3C's wget/wput, which is a command-line interface to HTTP/HTTPS.
(again how run unattended)

What is the easiest, cost effective way?

Thanks, Peter
all said what you asked for ..
I suggest using scp (or sftp, if you like more) with a public key authentification, that solves aour "unattendend" script too.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.