How to copy SSL certificate from a certificate authority to EC2? [duplicate]

谁说胖子不能爱 提交于 2020-07-22 05:16:09

问题


I am trying to create dev-endpoint server on EC2. I must copy my SSL certificate key store onto the Amazon EC2 instance

scp -i ec2-private-key keystore.jks ec2-user@dns-address-of-ec2-instance:~/keystore.jks

I followed ssl-certificate tutorial. How should my scp line look like?

scp -i  server.key server.cert ec2-user@my....

回答1:


You should use the following command:

scp -i $EC2_PEM $FILE $USERNAME@$REMOTE_HOST_ADDRESS:~/$PATH_TO_REMOTE_LOCATION

In this the following is what to use for the variables:

  • $EC2_PEM - The PEM for connecting to the server (what you would use to SSH)
  • $FILE - The name of the file (private key/public key), providing the full path (either absolute or relative) to the SSL on your current host machine
  • $USERNAME - The username used to SSH to the remote host
  • REMOTE_HOST_ADDRESS - Either the IP address or domain name of the server you are attempting to SCP the file to
  • $PATH_TO_REMOTE_LOCATION - The path that the file will live on disk

You will need to run this for each file individually.



来源:https://stackoverflow.com/questions/62815134/how-to-copy-ssl-certificate-from-a-certificate-authority-to-ec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!