Keytool设置主机名

Keytool设置主机名

本文介绍了Keytool设置主机名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,

我只是试图使用java keytool,但我不知道如何设置主机名。

I am just attempting to use the java keytool but I cannot figure out how to set the hostname.

这是我的尝试:

hostname[username:/this/is/a/path][640]% keytool -keystore server.keystore -genkeypair -alias hostname
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  hostname
What is the name of your organizational unit?
  [Unknown]:  hostname
What is the name of your organization?
  [Unknown]:  hostname
What is the name of your City or Locality?
  [Unknown]:  hostname
What is the name of your State or Province?
  [Unknown]:  hostname
What is the two-letter country code for this unit?
  [Unknown]:  CA
Is CN=hostname, OU=hostname, O=hostname, L=hostname, ST=hostname, C=CA correct?
  [no]:  yes

Enter key password for <hostname>
        (RETURN if same as keystore password):
hostname[username:/this/is/a/path][641]%

由于我将所有字段设置为hostname,我可以假定我的主机名设置为hostname?

Since I have set all fields to hostname can I assume that my hostname is set to hostname?

推荐答案

CN = hostname - 这是您在此要求的第一个选项。令人困惑的是,keytool将其称为名和姓。

CN=hostname - it's the first option you're being asked for here. It's confusing that keytool refers to it as "first and last name".

这篇关于Keytool设置主机名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 14:40