- 登錄您的服務器終端 (SSH)。
- 在命令提示符下,鍵入以下命令:openssl req -new -newkey rsa:2048 -nodes -keyout?yourdomain.key -out?yourdomain.csr
將?yourdomain?替換為您要保護的域名。例如,如果您的域名是?coolexample.com,您就應該鍵入?coolexample.key 和?coolexample.csr。
- 輸入申請的信息:
- Common Name(通用名稱):您要保護的完全限定域名或 URL。
如果您申請的是通配符證書,請在要添加通配符的通用名稱左邊添加星號 (*),例如?*.coolexample.com。 - Organization(組織):您的企業依法注冊的名稱。如果您要以個人身份注冊,請輸入證書申請人的姓名。
- Organization Unit(部門):(如果有)輸入 DBA(Doing Business As,經營部門)名稱。
- City or Locality(城市或地區):您的組織機構注冊或所在的城市。請勿使用縮寫。
- State or Province(州或省):您的組織機構所在的州或省。請勿使用縮寫。
- Country(國家/地區):您的組織機構依法注冊所在國家/地區的國家/地區代碼,使用國際標準化組織的兩字母格式。
如果您不想為該 SSL 輸入密碼,則可以將“密碼”字段保留為空。但是,這樣做可能會帶來額外的風險。
- Common Name(通用名稱):您要保護的完全限定域名或 URL。
- 在文本編輯器中打開 CSR,然后復制所有文本。
- 將整個 CSR 粘貼到您賬戶中的 SSL 注冊表格中。
- linux參考示例:
(1)輸入命令:
#openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr
按提示輸入以下信息,生成的.csr和.key文件在執行命令行所處的文件夾位置
Country Name (2 letter code) [AU]:?CN ?(國家代碼)
State or Province Name (full name) [Some-State]:?BJ ?(省)
Locality Name (eg, city) []:?BJ ??(城市)
Organization Name (eg, company) [Internet Widgits Pty Ltd]:?iHost?(企業/組織)
Organizational Unit Name (eg, section) []:?IT ?(部門)
Organizational Unit Name (eg, section) []:?IT ?(部門)
Common Name (eg, YOUR name) []:?ibaohost.com ??(域名/請正確填寫)
Email Address []: ?(可直接回車)
Please enter the following 'extra' attributes to be sent with your certificate request
A challenge password []: ? (直接回車)
An optional company name []: ?(直接回車)
Use the name of the web-server as Common Name (CN). If the domain name (Common Name) is mydomain.com append the domain to the hostname (use the fully qualified domain name).