Ssl 解析证书时出现客户端错误(格式错误的证书)。

Ssl 解析证书时出现客户端错误(格式错误的证书)。,ssl,certificate,Ssl,Certificate,所以我已经为此工作了好几个小时了,运气不好。我已经配置了OpenSSL,创建了私钥,创建了csr,将csr提交给证书颁发机构,收到了批准的证书,现在当我尝试上传它时,我没有运气。我使用以下格式: aws iam upload-server-certificate --server-certificate-name certificate_object_name --certificate- body file://public_key_certificate_file --private-

所以我已经为此工作了好几个小时了,运气不好。我已经配置了OpenSSL,创建了私钥,创建了csr,将csr提交给证书颁发机构,收到了批准的证书,现在当我尝试上传它时,我没有运气。我使用以下格式:

aws iam upload-server-certificate --server-certificate-name certificate_object_name --certificate-    body file://public_key_certificate_file --private-key file://privatekey.pem
当我尝试用file://上传它时,我得到以下信息:

aws iam upload-server-certificate --server-certificate-name steptproductions --certificate-body file://Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem  --private-key file://Users/markhoyt/private-key.pem


Error parsing parameter '--certificate-body': file does not exist: Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem
aws iam upload-server-certificate --server-certificate-name car.pem --certificate-body file:/Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem  --private-key file:/Users/markhoyt/private-key.pem

A client error (MalformedCertificate) occurred when calling the UploadServerCertificate operation: Unable to parse certificate. Please ensure the certificate is in PEM format.
当我尝试将其与文件一起上载时:/I会得到以下结果:

aws iam upload-server-certificate --server-certificate-name steptproductions --certificate-body file://Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem  --private-key file://Users/markhoyt/private-key.pem


Error parsing parameter '--certificate-body': file does not exist: Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem
aws iam upload-server-certificate --server-certificate-name car.pem --certificate-body file:/Users/markhoyt/Downloads/www_steptproductions_com/www_steptproductions_com.crt.pem  --private-key file:/Users/markhoyt/private-key.pem

A client error (MalformedCertificate) occurred when calling the UploadServerCertificate operation: Unable to parse certificate. Please ensure the certificate is in PEM format.
我创建了一个实例,并通过以下方式登录到Amazon Linux AMI:

ssh -i steptproductions.pem ec2-user@ec2-54-183-166-45.us-west-1.compute.amazonaws.com

我似乎无法将文件上载到服务器。有人能帮忙吗?

您是用密码(或密码短语)创建私钥的吗?@user261490这有什么不同吗?对于没有密码的密钥,我也有同样的错误