script that runs before being able to upload file to FTP

I'm trying to create a security mechanism that only allows my application to upload files to my FTP (username and password login is not enough). To achieve this I was thinking of creating a key that is built in to the app, and before any file can be uploaded to the FTP this key has to be read and verified. If it's correct, then the file can be uploaded.

Is this something that is possible to do, and would this approach be preferred? Does anyone have any pointers on how to do this?

(note: i'm not asking for any code, just some pointers on where to start, since my searches aren't getting my anywhere)

Thanks.

Upvotes: 1

Views: 177

Answers (2)

DaveRandom
DaveRandom

Reputation: 88677

There's no point in reproducing an answer from another question verbatim, so I'll just post this link to it.

Upvotes: 0

Urlax
Urlax

Reputation: 21

if you are worried about unsecured wi-fi, etc, you can either use SFTP or tunneling over SSH e.g. with connectbot the use of public key crypto will will make sniffing harder.

if this is too much work for the intended userbase, you could generate one time passes (like google authenticator) and upload your file with a POST form or something.

if you are afraid of the key itself getting stolen (compromised device), there is little you can do..

Upvotes: 1

Related Questions