在 Amazon Linux 安裝 SSM Agent

安裝 SSM Agent

mkdir /tmp/ssm
cd /tmp/ssm
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
sudo status amazon-ssm-agent

關閉 requiretty

如果要讓 System Manager 能夠使用 sudo 權限的話,就必須關閉 requiretty,

不然會出現 sudo: sorry, you must have a tty to run sudo 的錯誤

sudo chmod 600 /etc/sudoers
sudo vi /etc/sudoers

註解掉 requiretty

# Defaults    requiretty

Reference