从RHEL 7.1 AMIs开始的实例似乎没有将SSH指纹写入系统日志(而不是cloud-init的输出),因此我无法使用AWS上的“获取系统日志”菜单UI或命令行工具,以找出已启动服务器的ssh指纹。
在Centos 7上默认有效。它可能是cloud-init配置的问题还是别的什么?
Cloud-init成功运行,SSH之后日志出现在/var/log
。
答案 0 :(得分:3)
It turned out that the RHEL7 image has the following line in the grub2 config in /etc/default/grub
:
GRUB_CMDLINE_LINUX=crashkernel=auto console=ttyS0,115200n8 console=tty0
changing the order of the 2 console entries will change the serial output to ttyS0 and the cloud init output will show up in the console output on the AWS UI after the grub2 config is created:
GRUB_CMDLINE_LINUX=crashkernel=auto console=tty0 console=ttyS0,115200n8
grub2-mkconfig -o /boot/grub2/grub.cfg
(To make it available on the first boot, a new image has to be created with the changes)