1

We have our infrastructure on amazon ec2. Because we are growing we are setting up a basic Web Server AMI image that we will use to launch new servers as we need them.

The main problem is that when the machine starts, it doesnt launch httpd because it ask for the certificate private key passphrase.

I am considering the option of storing the private key unencrypted (without passphrase). I know if someone gets the key can use it on my behalf, but my question is how can they get the key?

We have a strong password for ssh user and then for root user. The key will only have permissions for root access.

Is there any other way rather than ssh that someone can hack into the server and get the private key?

Do you know or work for some company that actually stores their keys unencrypted?

Thanks a lot

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255

2 Answers2

1

Anyone with physical access to the running machine (or host hardware) could access the unencrypted key. Otherwise, provided you set the file permissions correctly then it would take a complete compromise of the machines security (remote code execution + privilege execution, or similar) to read the private key. Since that would be a bad thing anyway, storing the private key unencrypted is fine.

I suggest that you ensure any keys stored are host-specific rather than global or user-specific, so that in the event of a single machine being compromised it would be easy to limit the damage.

James
  • 123
  • 5
1

What autopopulated said is close, but not entirely accurate, if you set things up correctly, not everyone has access to the certificate.

See the Apache official response on doing this here.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255