Create SSL certificate on Ubuntu 18.04

Overview

Create certificates in the following order using OpenSSL.

  1. Private key (.key)
  2. Certificate signing request (.csr)
  3. Authenticated certificate (.crt)

command

Please do the following

sudo openssl genrsa -aes128 -out hoge.key 2048
sudo openssl rsa -in hoge.key -out hoge.key
sudo openssl req -new -days 3650 -key hoge.key -out hoge.csr
sudo openssl x509 -in hoge.csr -out hoge.crt -req -signkey hoge.key -days 3650

Command details

$ sudo openssl genrsa -aes128 -out hoge.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
.....................................................................+++++
..........+++++
e is 65537 (0x010001)
Enter pass phrase for hoge.key: #Password you decide
Verifying - Enter pass phrase for hoge.key: #Re-enter password(For confirmation)

$ sudo openssl rsa -in hoge.key -out hoge.key
Enter pass phrase for hoge.key:
writing RSA key

$ sudo openssl req -new -days 3650 -key hoge.key -out hoge.csr
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Yamanashi
Locality Name (eg, city) []:city
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

$ sudo openssl x509 -in hoge.csr -out hoge.crt -req -signkey hoge.key -days 3650
Signature ok
subject=C = JP, ST = Yamanashi, L = city, O = Internet Widgits Pty Ltd
Getting Private key

Recommended Posts

Create SSL certificate on Ubuntu 18.04
tmux on Ubuntu
How to create an oleore certificate (SSL certificate, self-signed certificate)
Screen recording on Ubuntu 20.04
Web Bluetooth on Ubuntu20.04
Try DisplayLink on Ubuntu 20.04
Reinstall Kubernetes on Ubuntu 19.10
Use Flutter on Ubuntu
Install pyqt5 on ubuntu
Install Ruby on Ubuntu 20.04
Setting JAVA_HOME on Ubuntu
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Apache2 on Ubuntu20.04 LTS
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run tiscamera on Ubuntu 18.04
Build Zabbix on Ubuntu 20.04
Creating an SSL certificate using Let's Encrypt and setting up Nginx on Ubuntu 20
Using Flutter on Ubuntu (Part 2)
Building WebGIS on Ubuntu20.04 LTS
Install OpenJDK7 (JAVA) on ubuntu 14.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Build VNC Server on Ubuntu 20.04
Install Cybozu Office 10 on Ubuntu 20.4
Extend swap area on Ubuntu 18.04
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Japanese input on Ubuntu20.04 Desktop
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install Arudino IDE on Ubuntu 20
Record video on ubuntu18.04 LTS
Introduced knowledge (wiki) on Ubuntu
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Run chromium-mir-kiosk on Ubuntu Core
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Run java applet on ubuntu
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Run Eclipse CDT on Ubuntu
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
A story of frustration trying to create a penetration environment on Ubuntu 20.04
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Install AWS IoT Greengrass on Ubuntu
Let's create Ubuntu environment with vmware
Using Azure IOT Hub on Ubuntu 20.10.
Installing Ruby + Rails on Ubuntu 18.04 (rbenv)
Install JDK and JRE on Ubuntu 16.10
Install ngrok on ubuntu16.04 using Vagrant
Build the latest Samba 4 on Ubuntu 20.04