SSLのパスフレーズ(Pass Phrase Dialog)入力を省略してApacheを起動する

このエントリーをはてなブックマークに追加

パスフレーズ付きでSSLの鍵を作ると、Apache再起動の際にパスフレーズの入力を求められます。

こんな感じです。

通常の起動プロセス

[root@www5254ue ~]# service httpd restart
httpd を停止中:                                            [  OK  ]
httpd を起動中: Apache/2.2.15 mod_ssl/2.2.15 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.

Server weblogy.co.jp:443 (RSA)
Enter pass phrase:

Apache:mod_ssl:Error: Pass phrase incorrect (5 more retries permitted).
Enter pass phrase:

OK: Pass Phrase Dialog successful.
                                                           [  OK  ]

でもこれだと再起動の際に毎回入力するのは面倒だし、何より自動再起動の際にここでストップしてしまいます。

そこでこのパスフレーズの入力を省略して起動できるようにしてみましょう。

方法は2つあります。

1.パスフレーズ無しの鍵にする
2.パスフレーズ応答スクリプトを設定する

1.パスフレーズ無しの鍵にする

1については、最初からパスフレーズなしで作る方法と、後からパスフレーズを消す方法とあります。

1-A パスフレーズなしで鍵を生成する場合

通常の作成方法

# openssl genrsa -des3 -out ./ssl.key/xxxxxxx.key 2048

パスワードなしの作成方法

# openssl genrsa -out ./ssl.key/xxxxxxx.key 2048

1-B パスフレーズを後から解除する場合

元ファイルのバックアップ

# cp xxxxxxx.key xxxxxxx.key.org

パスフレーズの解除

# openssl rsa -in xxxxxxx.key -out xxxxxxx.key

これで、パスフレーズ無しの鍵ができます。

パスワード自動応答スクリプトを設置する

まず、パスワードを自動的に応答するシェルスクリプトを書きます。シェルスクリプトと言っても、パスフレーズをエコーするだけの単純なものです。
これはどこに設置してもいいんですが、SSL関連の設定が置いてある/etc/ssl/certs/に置くことにします。

vi /etc/ssl/certs/pass_phrase.sh
#!/bin/sh
echo "your passphrase"

実行権限を与えておきます。

chmod 500 /etc/ssl/certs/pass_phrase.sh

次に、SSLの設定を変更します。

# vi /etc/httpd/conf.d/ssl.conf
#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
#SSLPassPhraseDialog  builtin
SSLPassPhraseDialog  exec:/etc/ssl/certs/pass_phrase.sh

SSL設定の中野、パスフレーズダイアログの部分を、「builtin」から、先ほどのスクリプトの実行指定に変更しました。

これで完成です。再起動を試してみましょう。

# service httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]

SSLのパスフレーズ(Pass Phrase Dialog)入力を省略してApacheを起動する」への104件のフィードバック

  1. ピンバック: RapidSSLでブログをSSL化してみた | ふぁろぐねっと

  2. important link

    I just want to tell you that I am beginner to blogging and certainly liked this web site. Almost certainly I’m want to bookmark your blog post . You certainly have tremendous articles and reviews. Thank you for sharing with us your blog site.

    返信
  3. Nigel

    I currently am running 2 blog sites, one is for layout & growth and I have a pagerank of 4 on it and also I have lots of excellent write-ups. As well as I have one more blog where I have rants, wellness suggestions and photography … Should I merge them or should I maintain it seperate?.

    返信
  4. crushing

    Hi, Neat post. There’s a problem with your site in web explorer, may test this?IE still is the marketplace leader and a good component of other people will miss your wonderful writing becauseof this problem.

    返信
  5. dusky

    I will right away seize your rss feed as I can not to find your e-mail subscription link or newsletter service. Do you’ve any? Please let me recognise so that I may just subscribe. Thanks.

    返信
  6. boldness

    assuming Thomas would buzz through the gate on a non stop trip to the cafeteria for dinner. Famer one day when Ileave the league. Just be the best I can be.

    返信
  7. tooth

    Assuming you want a man who has some very specific needs for sleep.Women want a SHARPNESS setting in the. Hook up sites reviews from younger women.

    返信
  8. Reyes

    Have you ever considered creating an e-book or guest authoring on other sites?
    I have a blog based on the same subjects you discuss and would really like to have you share some stories/information. I know my audience would enjoy
    your work. If you’re even remotely interested, feel
    free to shoot me an email.

    返信
  9. Roseann Feller

    Good day there, just turned out to be alert to your blogging site through The Big G, and found that it’s quite useful. I will appreciate if you decide to keep up this approach.

    返信
  10. Jenna Bachan

    This is most suitable opportunity to have some options for the foreseeable future. I’ve study this posting and if I would, I wish to propose you couple interesting pointers.

    返信
  11. poker online

    magnificent points altogether, you simply won a logo new
    reader. What may you suggest in regards to your publish that
    you just made a few days in the past? Any sure?

    返信
  12. poker club

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add
    to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your
    new updates.

    返信
  13. CrowdforApps

    Your style is really unique compared to other people I’ve read stuff from. Many thanks for posting when you have the opportunity, Guess I’ll just bookmark this blog.

    返信
  14. CrowdforThink

    You are so awesome! I don’t think I’ve truly read through anything like this before. So good to find someone with some original thoughts on this subject matter. Seriously.. many thanks for starting this up. This site is one thing that is required on the internet, someone with some originality.

    返信
  15. 포항출장안마

    I was recommended this blog by way of my cousin. I’m no longer sure whether this put up is written by
    way of him as no one else understand such unique about my problem.
    You are incredible! Thanks!

    返信
  16. Clayton Roehling

    Howdy! This post couldn’t be written any better! Looking at this article reminds me of my previous roommate! He always kept talking about this. I’ll send this article to him. Fairly certain he’ll have a great read. Thanks for sharing!

    返信
  17. 대구출장안마

    You could certainly see your enthusiasm within the
    article you write. The arena hopes for even more passionate
    writers such as you who aren’t afraid to say how they believe.
    All the time go after your heart.

    返信
  18. 부안콜걸

    I’m no longer positive where you are getting your information, but great
    topic. I needs to spend some time learning more or understanding more.
    Thanks for wonderful info I used to be searching for
    this info for my mission.

    返信
  19. BrucePef

    I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. Thanks for sharing the information keep updating, looking forward to more posts.

    返信
  20. Kasha Cloninger

    Howdy there, just turned out to be alert to your webpage through Bing, and realized that it is seriously entertaining. I will value in the event you continue on this informative article.

    返信
  21. web design bucuresti

    I know this if off topic but I’m looking into starting my own blog and
    was wondering what all is required to get set up? I’m assuming
    having a blog like yours would cost a pretty penny?
    I’m not very internet savvy so I’m not 100% positive.

    Any tips or advice would be greatly appreciated.
    Appreciate it

    返信
  22. viagra

    You’re so awesome! I don’t think I have read through something like that before. So good to find somebody with a few genuine thoughts on this topic. Seriously.. thanks for starting this up. This website is one thing that is required on the internet, someone with some originality.

    返信
  23. creare site web bucuresti

    Its like you read my mind! You seem to know
    a lot about this, like you wrote the book in it or something.
    I think that you can do with some pics to drive the message home a bit, but other than that, this is fantastic blog.
    An excellent read. I’ll certainly be back.

    返信
  24. Terence Ahmed

    It’s convenient time to generate some options for the long run. I’ve study this write-up and if I may possibly, I want to recommend you couple of interesting tips.

    返信
  25. Michaeljef

    Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info.

    返信
  26. visit

    I simply want to mention I’m all new to blogging and site-building and honestly loved your web site. Almost certainly I’m want to bookmark your blog post . You surely come with great articles and reviews. Thanks a bunch for sharing with us your webpage.

    返信
  27. navigate to this web-site

    I just want to say I’m very new to blogging and site-building and certainly liked this web site. More than likely I’m planning to bookmark your website . You amazingly come with awesome article content. Thanks a lot for revealing your blog.

    返信
  28. viagra

    A fascinating discussion is definitely worth comment. There’s no doubt that that you ought to write more about this issue, it might not be a taboo matter but generally people do not discuss these topics. To the next! All the best.

    返信
  29. Rodrigo Fankhauser

    Hello there! This post could not be written much better! Looking at this post reminds me of my previous roommate! He continually kept talking about this. I’ll send this article to him. Pretty sure he will have a very good read. Thank you for sharing!

    返信
  30. hotmail iniciar sesion

    Having read this I believed it was very enlightening. I appreciate you taking the time and effort to put this short article together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worth it!

    返信
  31. ytpewriter

    I’m assuming having a blog like yours would cost a pretty penny?I’m not very internet savvy so I’m not 100 sure.Any suggestions or advice would be greatly appreciated.Kudos

    返信
  32. Metroclick

    It is actually practically not possible to see well-aware people on this subject, even though you appear like you know what exactly you’re covering! With Thanks

    返信
  33. VSLprint

    It really is the best opportunity to prepare some schemes for the future. I’ve read through this piece of writing and if I have the ability to, I desire to suggest to you you very few intriguing recommendations.

    返信
  34. itunes gift card

    I’m not sure where you’re getting your information,
    but good topic. I needs to spend some time learning
    much more or understanding more. Thanks for magnificent information I was looking for this information for my mission.

    返信
  35. HaroldPag

    I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be great if you could point me in the direction of a good platform.

    返信
  36. Fastandy

    Aw, this was an incredibly good post. Spending some time and actual effort to generate a very good article… but what can I say… I procrastinate a lot and don’t seem to get nearly anything done.

    返信
  37. nudercut

    My partner and I absolutely love your blog and find most of your post’s to be just what I’m looking for. can you offer guest writers to write content to suit your needs?

    返信
  38. asigurare rca online

    Great article! This is the kind of info that should be shared around the
    net. Shame on the seek engines for no longer positioning this post upper!
    Come on over and talk over with my website . Thanks =)

    返信
  39. Maurice Perra

    Hiya here, just started to be conscious of your wordpress bog through Search engine, and realized that it is seriously good. I will appreciate if you decide to maintain this post.

    返信
  40. We List Products

    You’re so cool! I do not suppose I’ve read something like that before. So good to find another person with some genuine thoughts on this subject matter. Seriously.. thanks for starting this up. This website is something that’s needed on the web, someone with a little originality.

    返信
  41. бланк заявления на обмен инн

    Good day I am so glad I found your blog, I really found you by error, while I was searching on Bing for something else, Nonetheless I am here now and would just like to say thanks for a remarkable post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the fantastic b.| а

    返信
  42. Jacquline Rushen

    This is the right day to put together some preparations for the possible future. I have browsed this blog post and if I can, I want to recommend you very few insightful recommendation.

    返信
  43. shop wise

    I’m impressed, I must say. Seldom do I come across a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. The issue is something that not enough people are speaking intelligently about. I’m very happy I came across this in my search for something concerning this.

    返信
  44. Notarias en Cancun

    Nice post. I learn something totally new and challenging on blogs I stumbleupon every day. It will always be interesting to read content from other authors and use a little something from their sites.

    返信
  45. robuw generator

    Wonderful story, reckoned we could combine a couple of unrelated information, nonetheless genuinely really worth taking a search, whoa did one understand about Mid East has got extra problerms also

    返信
  46. cbd oil

    I blog frequently and I genuinely appreciate your content. This great article has really peaked my interest. I am going to bookmark your website and keep checking for new information about once a week. I subscribed to your RSS feed too.

    返信
  47. rpemeditation

    Heya i am for the first time here. I found this board and I findIt really useful & it helped me out much. I hope to give something backand help others like you helped me.

    返信

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>