본문 바로가기
프로그래밍/DevOps

Generate crt and key on Amazon Linux

by 개미뚠뚠이 2023. 1. 26.
728x90
$ openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out server.crt -keyout server.key
Generating a 4096 bit RSA private key
...................................................................................................................................................................++
...................++
writing new private key to 'server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:SK
State or Province Name (full name) []:Seoul
Locality Name (eg, city) [Default City]:Seoul
Organization Name (eg, company) [Default Company Ltd]:yourcompany
Organizational Unit Name (eg, section) []:yourdepartment
Common Name (eg, your name or your server's hostname) []:your.domain.com
Email Address []:your@email.com
$ sudo chmod 777 server.crt
$ sudo chmod 777 server.key

 

728x90

댓글