打包程序将私钥存储在哪里?

打包程序将私钥存储在哪里?

我从 ubuntu shell 运行以下命令,与 AWS 平台通信:

$ packer build -debug template.packer 
Debug mode enabled. Builds will not be parallelized.
amazon-ebs output will be in this color.

==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Pausing after run of step 'StepPreValidate'. Press enter to continue. 
==> amazon-ebs: Inspecting the source AMI...
==> amazon-ebs: Pausing after run of step 'StepSourceAMIInfo'. Press enter to continue. 
==> amazon-ebs: Creating temporary keypair: packer 5dfe9f3b-9cc2-cbfa-7349-5c8ef50c64d5
    amazon-ebs: Saving key for debug purposes: ec2_amazon-ebs.pem
==> amazon-ebs: Pausing after run of step 'StepKeyPair'. Press enter to continue. 

哪里template.packer

{
    "builders": [
        {
            "type": "amazon-ebs",
            "region": "us-west-2",
            "source_ami": "ami-9abea4fb",
            "instance_type": "t2.micro",
            "ssh_username": "ubuntu",
            "ami_name": "MiddleTier-{{isotime | clean_ami_name}}",
            "ami_description": "Amazon AMI customised",
            "tags": {
                "role": "MiddleTier"
            },
            "run_tags":{
                "role": "buildSystem"
            }
        }
    ],
    "provisioners": [

    ],
    "post-processors":[

    ]
}

我的理解是,AWS 已经为打包程序创建了一个私钥(ec2_amazon-ebs.pem),以便以无密码方式与 EC2 实例通信,如上述步骤中所述。

但我没有看到打包程序在我的笔记本电脑中复制私钥ec2_amazon-ebs.pem(因为~/.ssh/ec2_amazon-ebs.pem

打包程序如何与 EC2 通信?无需像~/.ssh/ec2_amazon-ebs.pem在笔记本电脑中那样进行复制

相关内容