Lost ssh_host* config files(etc/ssh) when I reuse my image (AMI)

0

Since when the /etc/ssh/ssh_host_* files are not include in the images? Enter image description here

질문됨 일 년 전234회 조회
1개 답변
0

Hello,

The ‘ll’ command is commonly used to get a more detailed and comprehensive listing of files and directories in a directory. In this case, the /etc/ssh/ssh_host_* files in Linux are generated dynamically during the first start of an instance. These files have the host keys used for SSH server authentication. When you create an Amazon Machine Image (AMI) from an instance, these dynamically generated files are not included in the image.

The reason for this is that host keys are meant to be unique to each instance to ensure secure communication. Including pre-generated host keys in the image could lead to security vulnerabilities, as multiple instances would have the same keys.

When launching an instance from an AMI, the host keys are regenerated during the first boot of the new instance. This ensures that each instance has unique host keys for secure SSH connections. Therefore, it is expected behaviour that the /etc/ssh/ssh_host_* files are not included in the AMI and are generated when the instance is launched.

In case you ignore to remove the current SSH host key pairs from your public AMI, our regular auditing procedure will alert both you and all customers who have launched instances from your AMI about the potential security hazard. Following a brief grace period, we designate the AMI as private.

Please find below some documentation to guide you further:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/building-shared-amis.html#remove-ssh-host-key-pairs

Thank You.

AWS
Kenan_M
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠