79392154

Date: 2025-01-27 20:58:33
Score: 0.5
Natty:
Report link

SSH over Session Manager 


vi ~/.ssh/config

Copy the below command to your ssh config file.

host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"

View ssh.config file to confirm the changes:

cat ~/.ssh/config

Connect to your EC2 instance:

ssh <instance-id>
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Duru Cynthia Udoka