{"id":2505,"date":"2015-11-05T13:44:56","date_gmt":"2015-11-05T13:44:56","guid":{"rendered":"https:\/\/unihost.com\/help\/?p=2505"},"modified":"2023-01-19T13:47:01","modified_gmt":"2023-01-19T10:47:01","slug":"generate-csr-request-and-private-key-linux","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/","title":{"rendered":"Generate CSR request and private key (Linux)"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu,sans-serif;\">To generate CSR request and private key via Ubuntu Linux console follow the instructions.<\/span><!--more--><\/p>\n<p><span style=\"font-family: Ubuntu,sans-serif;\"><strong>For one domain.<\/strong><\/span><\/p>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">Enter the console and see:<\/span><\/p>\n<pre lang=\"php\">openssl req -nodes -newkey rsa:2048 -keyout domain.com.key -out domain.com.csr -subj \"\/C=UA\/ST=Lvovskaya oblast\/L=Yavorov\/O=domain.com\/CN=domain.com\/emailAddress=admin@domain.com\"<\/pre>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">Fill it with the necessary data: domain.com.- domain name. UA &#8211; country abbrevition (use only lowercase letters). Lvovskaya oblast &#8211; state\/province, Yavorov &#8211; locality\/city. admin@domain.com &#8211; e-mail for verification, not necessarily.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">We get 2 files: domain.com.key and domain.com.csr.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu,sans-serif;\"><strong>Multi-domain:<\/strong><\/span><br \/>\n<span style=\"font-family: Ubuntu,sans-serif;\">1. Generate a private key for domain.com:<\/span><\/p>\n<pre lang=\"php\">openssl genrsa -out domain.com.key 2048<\/pre>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">2. Create a <strong>OpenSSL<\/strong> config file with the name <em><strong>openssl.cnf<\/strong><\/em>:<\/span><\/p>\n<pre lang=\"php\">[req]\ndistinguished_name = req_distinguished_name\nreq_extensions = v3_req\n[req_distinguished_name]\ncountryName = Country Name (2 letter code)\ncountryName_default = UA\nstateOrProvinceName = State or Province Name (full name)\nstateOrProvinceName_default = LV\nlocalityName = Locality Name (eg, city)\nlocalityName_default = Lviv\norganizationalUnitName  = Organizational Unit Name (eg, section)\norganizationalUnitName_default  = Domain Control Validated\ncommonName = Company Ltd\ncommonName_default = domain.com\ncommonName_max  = 64\n  \n[ v3_req ]\n# Extensions to add to a certificate request\nbasicConstraints = CA:FALSE\nkeyUsage = nonRepudiation, digitalSignature, keyEncipherment\nsubjectAltName = @alt_names\n  \n[alt_names]\nDNS.1 = domain.com\nDNS.2 = *.domain.com\nDNS.3 = domain.com.ua\nDNS.4 = domain.ru\n<\/pre>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">3. Generate CSR request for a certificate:<\/span><\/p>\n<pre lang=\"php\">openssl req -new -out domain.com.csr -key domain.com.key -config openssl.cnf<\/pre>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">We get 2 files: domain.com.key and domain.com.csr.<br \/>\n<code class=\"bash plain\"><code class=\"bash plain\"><\/code><\/code><\/span><\/p>\n<p><span style=\"font-family: Ubuntu,sans-serif;\">CSR request and private key were successfully created via Ubuntu Linux console.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To generate CSR request and private key via Ubuntu Linux console follow the instructions.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[166],"tags":[244,126],"class_list":["post-2505","post","type-post","status-publish","format-standard","hentry","category-08-ssl","tag-csr-request","tag-linux-ru"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generate CSR request and private key (Linux) - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generate CSR request and private key (Linux) - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-05T13:44:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T10:47:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"Generate CSR request and private key (Linux)\",\"datePublished\":\"2015-11-05T13:44:56+00:00\",\"dateModified\":\"2023-01-19T10:47:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\"},\"wordCount\":122,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"keywords\":[\"CSR request\",\"Linux\"],\"articleSection\":[\"08. SSL certificates\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\",\"url\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\",\"name\":\"Generate CSR request and private key (Linux) - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"datePublished\":\"2015-11-05T13:44:56+00:00\",\"dateModified\":\"2023-01-19T10:47:01+00:00\",\"description\":\"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generate CSR request and private key (Linux)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generate CSR request and private key (Linux) - Unihost.FAQ","description":"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/","og_locale":"en_US","og_type":"article","og_title":"Generate CSR request and private key (Linux) - Unihost.FAQ","og_description":"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.","og_url":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2015-11-05T13:44:56+00:00","article_modified_time":"2023-01-19T10:47:01+00:00","og_image":[{"width":250,"height":141,"url":"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png","type":"image\/png"}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"Generate CSR request and private key (Linux)","datePublished":"2015-11-05T13:44:56+00:00","dateModified":"2023-01-19T10:47:01+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/"},"wordCount":122,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"keywords":["CSR request","Linux"],"articleSection":["08. SSL certificates"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/","url":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/","name":"Generate CSR request and private key (Linux) - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"datePublished":"2015-11-05T13:44:56+00:00","dateModified":"2023-01-19T10:47:01+00:00","description":"Detailed instruction how to generate CSR request and private key using the console on Ubuntu Linux for single or multiple domains.","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/generate-csr-request-and-private-key-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"Generate CSR request and private key (Linux)"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/2505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=2505"}],"version-history":[{"count":4,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/2505\/revisions"}],"predecessor-version":[{"id":2512,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/2505\/revisions\/2512"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=2505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=2505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=2505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}