1 Answer
- Newest
- Most votes
- Most comments
0
If you mean SSM rather than SSH, and you're running a macos image, according to this page, https://docs.aws.amazon.com/systems-manager/latest/userguide/install-ssm-agent-macos.html, ssm-agent is pre-installed.
If you're running in a public subnet, you'll need a public ip associated with the EC2 instance. If you're in a private subnet, you'll need either a NAT gateway accessible from the subnet, or the appropriate VPC endpoints (if I remember, you'll need the 4 following: ec2, ssm, ec2-messages, ssm-messages).
answered a year ago
Relevant content
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
Hi @Simon, sorry for the delay but thanks for your reply.
I'm using MacBook Big Sur.
I did this by trying to install manually under this link --> Manually installing SSM Agent on EC2 instances for macOS - for the purpose to see if my macOS have this SSM Agent (which is installed by default):
Experiment:
sudo wget https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/darwin_amd64/amazon-ssm-agent.pkg
Result:
jsjs77@Sims-MacBook-Pro ~ % sudo wget https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/darwin_amd64/amazon-ssm-agent.pkg Password: --2023-05-01 15:18:01-- https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/darwin_amd64/amazon-ssm-agent.pkg Resolving s3.us-east-1.amazonaws.com (s3.us-east-1.amazonaws.com)... 52.217.124.40, 52.216.239.133, 52.217.174.224, ... Connecting to s3.us-east-1.amazonaws.com (s3.us-east-1.amazonaws.com)|52.217.124.40|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 30099366 (29M) [binary/octet-stream] Saving to: ‘amazon-ssm-agent.pkg’
amazon-ssm-agent.pkg 100%[======================================================================>] 28.70M 242KB/s in 46s
2023-05-01 15:18:53 (645 KB/s) - ‘amazon-ssm-agent.pkg’ saved [30099366/30099366]
Hi @Simon,
jsjs77@Sims-MacBook-Pro ~ % sudo installer -pkg amazon-ssm-agent.pkg -target / installer: Package name is amazon-ssm-agent installer: Installing at base path / installer: The install was successful. jsjs77@Sims-MacBook-Pro ~ % sudo launchctl load -w /Library/LaunchDaemons/com.amazon.aws.ssm.plist && sudo launchctl start com.amazon.aws.ssm /Library/LaunchDaemons/com.amazon.aws.ssm.plist: service already loaded Load failed: 37: Operation already in progress
Then, when I try to connect SSH Client to my Mac Terminal:
Result:
jsjs77@Sims-MacBook-Pro ~ % cd downloads jsjs77@Sims-MacBook-Pro downloads % chmod 400 teajngubun.pem jsjs77@Sims-MacBook-Pro downloads % ssh -i "teajngubun.pem" ubuntu@ec2-54-90-174-17.compute-1.amazonaws.com ssh: connect to host ec2-54-90-174-17.compute-1.amazonaws.com port 22: Operation timed out