- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp in cron job
Operating System - HP-UX
1754315
Members
2731
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 09:20 AM
тАО01-02-2007 09:20 AM
Need a cron job that automatically ftps certain kind of file with PGP encryption to a given ip. anyone know a way to accomplish this?
Thanks
brian
Thanks
brian
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 11:19 AM
тАО01-02-2007 11:19 AM
Re: ftp in cron job
Step 1. Figure out how to do the work.
Step 2. Write a shell script which does the
work.
Step 3. Tell "cron" to do the job
periodically, _if_ that's what you want done.
I'm sure that many people exist who could
solve this problem. Have you considered
hiring one of them?
Apparently you are not one of them, but if
you expect someone else to do the job for
you, whether paid or unpaid, you will almost
certainly need to define the problem better.
Interesting data would include what, exactly,
"automatically" means, what "certain kind of
file" means, which version of PGP is expected
to decrypt the stuff, whether a compatible
version of PGP is already available on your
system, and so on.
Even more interesting might be exactly what
the problem is which you are trying to solve.
There are may ways to arrange encrypted file
transfers beside using PGP encryption and
FTP.
Step 2. Write a shell script which does the
work.
Step 3. Tell "cron" to do the job
periodically, _if_ that's what you want done.
I'm sure that many people exist who could
solve this problem. Have you considered
hiring one of them?
Apparently you are not one of them, but if
you expect someone else to do the job for
you, whether paid or unpaid, you will almost
certainly need to define the problem better.
Interesting data would include what, exactly,
"automatically" means, what "certain kind of
file" means, which version of PGP is expected
to decrypt the stuff, whether a compatible
version of PGP is already available on your
system, and so on.
Even more interesting might be exactly what
the problem is which you are trying to solve.
There are may ways to arrange encrypted file
transfers beside using PGP encryption and
FTP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 11:42 AM
тАО01-02-2007 11:42 AM
Solution
Brian -
Attached is a snippet from a working production script using ftp and pgp.
This is run from cron.
I'll assume you know the switches used in the pgp command.
Also note, that for the ftp, no user name or password are present since a .netrc file is used to store them.
Should you not know the use of .netrc just do a search for it on the forums, there is plenty of discussion.
Additionally, many ITRC users prefer using perl for the ftp due to it's built in error checking.
Best of luck on this.
Regards,
-dl
Attached is a snippet from a working production script using ftp and pgp.
This is run from cron.
I'll assume you know the switches used in the pgp command.
Also note, that for the ftp, no user name or password are present since a .netrc file is used to store them.
Should you not know the use of .netrc just do a search for it on the forums, there is plenty of discussion.
Additionally, many ITRC users prefer using perl for the ftp due to it's built in error checking.
Best of luck on this.
Regards,
-dl
"I'm not dumb. I just have a command of thoroughly useless information."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-02-2007 07:59 PM
тАО01-02-2007 07:59 PM
Re: ftp in cron job
Hi,
Create file .netrc in home directory of the user as follows
machine target_host
login USERNAME
password PASSWORD
macdef init
asci
cd incoming
lcd /tmp
put FILENAME
quit
As you see, you have to edit the file above according to your needs.
After that add the following string to the user's cron:
01 10 * * * ftp target_host
If you need to execute different actions on the same target_host, you will have to update (may be by an additional script) .netrc accordingly.
The only disadvantage of this is open user/password in text file.
HTH
Create file .netrc in home directory of the user as follows
machine target_host
login USERNAME
password PASSWORD
macdef init
asci
cd incoming
lcd /tmp
put FILENAME
quit
As you see, you have to edit the file above according to your needs.
After that add the following string to the user's cron:
01 10 * * * ftp target_host
If you need to execute different actions on the same target_host, you will have to update (may be by an additional script) .netrc accordingly.
The only disadvantage of this is open user/password in text file.
HTH
Entities are not to be multiplied beyond necessity - RTFM
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP