Note that there are some explanatory texts on larger screens.

plurals
  1. POEncrypt or Hashing a password
    primarykey
    data
    text
    <p>I have a situation not very commom, or very commom for someone. I need to store some passwords in the database. Let me explain what I really need.</p> <p>I have some servers that I need to access 3 times a day, every day, all over the year, is a kind of non-stop service, the SSH service is running in each one of them, and also I have my software that request access to each one of the server 3 times a day. Well everything works just fine as I wish, the problem is, PASSWORDS! How to manage all passwords!</p> <p>Today I have all servers passwords in the script (the same script that actually run the SSH services), since I'm using SSH2 PHP Functions <code>ssh2_auth_password()</code> to authenticate to the servers, but it is plain text.</p> <p>what about this function <code>ssh2_ auth_ pubkey_ file()</code> ? How should I use this?</p> <p>Is it safe, store the password in my own scripts? I do not think so..</p> <p>Then what to do in this case? If I store the password in the database, I will need to retrieve password on each server request (it is running by cron), then if it is a hash I can compare with a another hash in my script and return a plain text for my function authenticate, still plain text.. (but I think it is not a good solution yet!).</p> <p>EnCrypt the passwords then DeCrypt the passwords every server request?? maybe possible.. </p> <p>Does someone have any idea what is the best to do in this situation?</p> <p>I'm in a pool!</p> <p>Thanks in advance for any light!</p> <p><strong>[EDITED]</strong></p> <p>My Arch is Kernel Linux 2.6 most of them, SaaS application running on a external (neutral server) and CronJobs are regurlary running 3 times/day everything is auto by command line, no human interaction.</p> <p><strong>[EDITED ONCE MORE]</strong></p> <p>Where should I generate the keypair(s) ? Is only one keypair enough for all my servers include the SaaS APP server ? or do I need to generate one by one? A bit confused ..</p> <pre><code> CRON JOBS (fire servers) 3x/day ------------ | SaaS APP |________________________ ________------------_______ | | | | | | | | | ----------- ----------- ----------- | | SERVER1 | | SERVER2 | | SERVER3 | .... SERVER4 .... ----------- ----------- ----------- </code></pre> <p>Thanks Again!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload