+86 13541016684Mon. - Fri. 10:00-22:00

Tag Archive for: AWS】获取EC2实例信息写入登录提示文件/etc/motd

  • 获取EC2实例信息写入登录提示文件/etc/motd

    在管理EC2的过程中,需要做一些人性化的处理,如登录到EC2之后,会显示一些EC2相关的信息,如IP,所在节点,实例类型等,下面这个脚本就是获取这些信息。 #  cat /usr/local/tools/ec2-metadata.sh #!/bin/bash # function print_help() { echo “Directly use this to create /etc/motd to show instance info.” } #check some basic configurations before running the c...

    Continue reading »