I'm using AWS Simple Session Manager along with the AWS CLI to SSH into instances. When I call aws ssm start-session --target INSTANCE_ID, it starts sh on the server, not bash. Is there any way to customize the command that is run on instance start?
You can do it using an AWS provided configuration document, like so:
aws ssm start-session --target INSTANCE_ID --document-name AWS-StartInteractiveCommand --parameters command="bash -l"
Source: a github issue on the topic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With