Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I run openssl s_client -connect 0.0.0.0:8006 I get the Server certificate as:

-----BEGIN CERTIFICATE-----
MIICSTCCAbKgAwIBAgIESfnb7zANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJJ ….

  1. From which destination does the machine take the "CERTIFICATE" with running the command openssl s_client -connect 0.0.0.0:8006? How can I learn from that about the server key or how to create the server key?

  2. There is a command that creates new CRT and KEY that after it the MD5 shows they FIT: openssl req -new -x509 -nodes -out server.crt -keyout server.key

The question:there is a command who can convert server.crt file to server.key file ? because I know the "CERTIFICATE" and need to find his KEY (server.key).

My default server key PATH: /Apache/Apache/conf/ssl.key/server.key

share|improve this question
2  
Possible duplicate of serverfault.com/questions/292238/how-to-find-the-server-key –  EightBitTony Jul 20 '11 at 13:46
1  
@EightBitTony Thanks for noticing, feel free to flag one of the two copies in these cases. David: do not cross-post, especially without notice, which is rude because it duplicates the effort from answerers. –  Gilles Jul 20 '11 at 14:26
    
I closed it here. If you want it here, flag the SF version and ask them to migrate –  Michael Mrozek Jul 20 '11 at 14:28
add comment

closed as off topic by Gilles, Michael Mrozek Jul 20 '11 at 14:27

Questions on Unix & Linux Stack Exchange are expected to relate to Unix or Linux within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Try an

lsof -i tcp:8006

to find the process which is serving port 8806. Alternatively you can find the PID via

netstat -tulpen | grep 8806

Afterwards look in the configuration of this process for the place of the certificates.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.