ssl key using command line in ubuntu server 18.0 code example
Example: create self signed certificate for localhost ubuntu
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt