View previous topic :: View next topic |
Author |
Message |
numerodix l33t
Joined: 18 Jul 2002 Posts: 743 Location: nl.eu
|
Posted: Tue Dec 03, 2002 7:59 pm Post subject: scp as batch job |
|
|
I've been trying to set up a cron job that will download a certain file at a given interval. And I've been using ftp so far but I would like to upgrade the security and move on to scp/sftp. But somehow I've failed to understand how it can be done in non-interactive mode. With wget I used this line:
Code: | wget -nv -o wget.log ftp://username:password@www.site.com/path/to/file |
Can you tell me how to set up the equivalent with scp or sftp? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Dec 03, 2002 8:36 pm Post subject: |
|
|
First off, you might be interested in a series drobbins wrote for IBM's developerWorks: Here's part 1. Once you have ssh configured to use public key authentication, you won't need to type passwords. You can use the keychain utility to deal with ssh-agent too, if you wish. At that point, I think you can: _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Tue Dec 03, 2002 10:15 pm Post subject: |
|
|
Not that complete, but you can start with
If your passphrase is empty, it won't require a password to run the script.
Cheers |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Dec 04, 2002 12:49 am Post subject: scp batching |
|
|
look into ssh trusts, I'd expound, but this guy has done it so much better.
http://boran.dyndns.org/security/sp/ssh-part2.html#Trusts
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
Kream n00b
Joined: 19 Apr 2002 Posts: 30 Location: New Delhi, India
|
Posted: Fri Dec 06, 2002 4:52 am Post subject: |
|
|
emerge dev-tcltk/expect
use autoexpect to create the script. |
|
Back to top |
|
|
|