In this blog post , We have explain how to install SSM Agent on Linux EC2 Instances.
What is SSM Agent?
SSM stands for Simple Systems Manager.
Amazon SSM agent is the software which can be installed on the EC2 Instances , On-premise servers or virtual machines for the systems manager to update , configure and run commands remotely.
SSM agent is preinstalled on certain Operating systems.
SSM Agent Installed by Default
SSM agent is installed by default of the following EC2 Instances and the Amazon Machine Images.
Amazon Linux
Amazon Linux 2
Ubuntu 16.04
Ubuntu 18.04
Amazon ECS-optimized Instances
Whenever a new capabilities are added to Systems Manager , We need to update the existing version of SSM agent which is already installed on the system.
Let us see how to install latest version of SSM agent manually on Linux EC2 Instances.
Install SSM Agent on Amazon Linux
Login to Amazon Linux EC2 instance using SSH client and follow the below steps to install SSM agent.
Lets download the SSM agent and run the agent installer using the below command.
To start the amazon-ssm-agent service on the Centos Linxu Instance,
sudo systemctl start amazon-ssm-agent
To check the status of SSM agent,
sudo systemctl status amazon-ssm-agent
Run the below command to automatically start the service on instance reboot or instance boot up.
sudo systemctl enable amazon-ssm-agent
Install SSM Agent on Ubuntu 18.04
On Ubuntu operating systems , You can install either using debian installer packages or using snap packages.
To install using snap:
You can check if ssm-agent is already installed using snap ,Run the below command:
snap list amazon-ssm-agent
With the help of snap , We done need to download the ssm agent package , because the snap command automatically downloads the ssm agent from the Snap app store.
snap install amazon-ssm-agent --classic
Run the below command to verify whether the amazon ssm agent is installed on the ubuntu system.
sudo snap list amazon-ssm-agent
To start the ssm agent service,
sudo snap start amazon-ssm-agent
To check the status of the amazon ssm agent service,
sudo snap services amazon-ssm-agent
You can remove the amazon ssm agent using the below command.
sudo snap remove amazon-ssm-agent
Install SSM Agent on Ubuntu 16.04
First we need to download the debian package of amazon ssm agent.