简体   繁体   English

如何使用打包程序在没有SSH的情况下构建AMI

[英]How to use packer to build AMI without SSH

I would like to use packer to build AMI's where SSH is not running. 我想使用打包程序来构建未运行SSH的AMI。 This will be for immutable infrastructure. 这将用于不变的基础架构。 We will be building base / golden images and then building more streamlined images from the base image but, ultimately, I don't want SSH or any other means of remote access to the image. 我们将构建基础/黄金图像,然后从基础图像构建更多精简的图像,但最终,我不希望使用SSH或任何其他远程访问该图像的方法。 Can packer do this? 包装员可以这样做吗?

I'm not sure about Packer's ability to do this. 我不确定Packer的功能。 However, you could use AWS Security Groups to control SSH access to your EC2 instances after they've been spun up using your AMIs. 但是,在使用AMI启动EC2实例后,您可以使用AWS安全组来控制对EC2实例的SSH访问。

Just create a Security Group that denies all ingress connections, and place your EC2 instance into it. 只需创建一个拒绝所有入口连接的安全组,然后将您的EC2实例放入其中即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM