Certbot: 두 판 사이의 차이

IT위키
편집 요약 없음
편집 요약 없음
 
(같은 사용자의 중간 판 6개는 보이지 않습니다)
5번째 줄: 5번째 줄:
== 사용법 ==
== 사용법 ==
=== 설치 ===
=== 설치 ===
=== 확인 ===
발급된 인증서 확인
<pre>
[ec2-user@ip-172-9-3-9~]$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: ooo.kr
    Serial Number: asd123456...
    Key Type: RSA
    Domains: ooo.kr *.ooo.kr
    Expiry Date: 2021-05-01 13:37:04+00:00 (VALID: 13 days)
    Certificate Path: /etc/letsencrypt/live/ooo.kr/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/ooo.kr/privkey.pem
  Certificate Name: ooo.ooo.kr
    Serial Number: fnklnl12345...
    Key Type: RSA
    Domains: ooo.ooo.kr
    Expiry Date: 2021-05-01 09:10:37+00:00 (VALID: 13 days)
    Certificate Path: /etc/letsencrypt/live/ooo.ooo.kr/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/ooo.ooo.kr/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
</pre>
* 유효기간 등 확인 가능능


=== 갱신 ===
=== 갱신 ===
;인증서를 자동으로 생성한 경우
* 일반적으로 [[와일드 카드]]가 아닌 단일 도메인을 대상으로 한 경우<ref>와일드 카드가 아님에도 manual 옵션을 주어 생성한 인증서는 이 방식을 사용할 수 없다.</ref>
<pre>
<pre>
$ sudo certbot renew
$ sudo certbot renew
</pre>
</pre>


== 기타 ==
;인증서를 수동으로 생성한 경우
* 인증서 유효기간 등 정보 확인
* manual 옵션을 주어 생성한 경우
$ sudo certbot certificates
* 일반적으로 와일드 카드 인증서를 생성한 경우가 해당
<pre>
<pre>
[ec2-user@ip-172-9-9-9~]$ sudo certbot certificates
$ sudo certbot certonly --manual
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel): [사용자 입력]
Cert is due for renewal, auto-renewing...
Renewing an existing certificate for [입력한 도메인]
Performing the following challenges:
dns-01 challenge for [입력한 도메인]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.ooo.kr with the following value:
HNM2e1n2ed_@mm2e...dQQ


Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Press Enter to Continue
  Certificate Name: ooo.kr
</pre>
    Serial Number: 1234567...
* 인증서를 새로 생성할 때와 같은 절차 진행
    Key Type: RSA
* 인증서 생성 대상 도메인에 이미 존재하는 도메인을 넣을 경우 자동으로 renew로 인식
    Domains: ooo.kr
 
    Expiry Date: 2021-07-16 14:33:21+00:00 (VALID: 89 days)
=== 삭제 ===
    Certificate Path: /etc/letsencrypt/live/ooo.kr/fullchain.pem
<pre>
    Private Key Path: /etc/letsencrypt/live/ooo.kr/privkey.pem
[ec2-user@ip-172-9-3-9 ~]$ sudo certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log
 
Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: ooo.kr
2: ooo.ooo.kr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 2
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificate(s) are selected for deletion:
 
  * ooo.ooo.kr
 
Are you sure you want to delete the above certificate(s)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Deleted all files relating to certificate ooo.ooo.kr.
</pre>
</pre>


36번째 줄: 96번째 줄:
</pre>
</pre>
* 원인 및 해결법: [https://darkstart.tistory.com/109?category=871909 관련 블로그 글 보기]
* 원인 및 해결법: [https://darkstart.tistory.com/109?category=871909 관련 블로그 글 보기]
== 각주 ==

2021년 4월 19일 (월) 00:11 기준 최신판

Let's Encrypt에서 제공하는 인증서를 손쉽게 설치하고 갱신하는 등 관리할 수 있도롬 만들어진 ACME 도구
  • 개발사: Electronic Frontier Foundation (EFF)[1]

사용법[편집 | 원본 편집]

설치[편집 | 원본 편집]

확인[편집 | 원본 편집]

발급된 인증서 확인

[ec2-user@ip-172-9-3-9~]$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: ooo.kr
    Serial Number: asd123456...
    Key Type: RSA
    Domains: ooo.kr *.ooo.kr
    Expiry Date: 2021-05-01 13:37:04+00:00 (VALID: 13 days)
    Certificate Path: /etc/letsencrypt/live/ooo.kr/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/ooo.kr/privkey.pem
  Certificate Name: ooo.ooo.kr
    Serial Number: fnklnl12345...
    Key Type: RSA
    Domains: ooo.ooo.kr
    Expiry Date: 2021-05-01 09:10:37+00:00 (VALID: 13 days)
    Certificate Path: /etc/letsencrypt/live/ooo.ooo.kr/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/ooo.ooo.kr/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • 유효기간 등 확인 가능능

갱신[편집 | 원본 편집]

인증서를 자동으로 생성한 경우
$ sudo certbot renew
인증서를 수동으로 생성한 경우
  • manual 옵션을 주어 생성한 경우
  • 일반적으로 와일드 카드 인증서를 생성한 경우가 해당
$ sudo certbot certonly --manual
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel): [사용자 입력]
Cert is due for renewal, auto-renewing...
Renewing an existing certificate for [입력한 도메인]
Performing the following challenges:
dns-01 challenge for [입력한 도메인]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.ooo.kr with the following value:

HNM2e1n2ed_@mm2e...dQQ

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
  • 인증서를 새로 생성할 때와 같은 절차 진행
  • 인증서 생성 대상 도메인에 이미 존재하는 도메인을 넣을 경우 자동으로 renew로 인식

삭제[편집 | 원본 편집]

[ec2-user@ip-172-9-3-9 ~]$ sudo certbot delete
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Which certificate(s) would you like to delete?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: ooo.kr
2: ooo.ooo.kr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificate(s) are selected for deletion:

  * ooo.ooo.kr

Are you sure you want to delete the above certificate(s)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Deleted all files relating to certificate ooo.ooo.kr.

트러블 슈팅[편집 | 원본 편집]

  • 인증서 자동 갱신 시도 시 아래와 같은 에러 발생[3]
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',).

각주[편집 | 원본 편집]

  1. 샌프란시스코의 비영리 단체
  2. 와일드 카드가 아님에도 manual 옵션을 주어 생성한 인증서는 이 방식을 사용할 수 없다.
  3. 이 외 기본적인 에러 메시지 템플릿도 출력되지만, 주요한 내용만 발췌