大网数据广告活动
服务器运维问答

Can I create a CSR without a Fully Qualified Domain Name?

· 52CE 我爱测

My client has an Ubuntu server hosted by Digital Ocean. The server has no domain name, we access it via the public IP address. They want to start using https and provided me with a SSL certificate from GoDaddy.com. I need to prov…

问题原文

原帖链接 · JorgeZapatero · CC BY-SA 4.0

My client has an Ubuntu server hosted by Digital Ocean. The server has no domain name, we access it via the public IP address. They want to start using https and provided me with a SSL certificate from GoDaddy.com. I need to provide GoDaddy with a CSR to set up the SSL certificate.

My attempt to create a CSR and private key on the server:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

The problem is I have nothing to put for the Common Name (eg, fully qualified host name) []: prompt. Is it ok to simply put the IP address instead?

While researching this, I have come across Subject Alternative Names (SAN) that can specify IP addresses, but I'm not sure how to add that to the CSR.

Do I need to tell my client they should get a domain name?

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 4.0

You can, but you shouldn't as you are obviously discussing DV-certificates here.

A certificate identify "something". That something can be an organization, an individual, a website, an email address, an IP address, a piece of code, etc.

If you are creating certificates to be used in the HTTPS world you need to have a DNS name in the certificate, in the SAN section. You should not use HTTPS URLs with IP addresses in the hostname part because, even if can technically work, and you can have certificates with IP addresses instead of names, they have to be generated differently and you will have far more troubles finding a CA to sign them.

You should register a domain name, anyone, and then use that as a suffix to name all your hosts, and you solve your problem they way it should be done: all hosts now have a name, and hence you can create a proper certificate for that name.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-12-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。