Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have SSM start-session use bash

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?

like image 517
Zags Avatar asked Jun 08 '26 07:06

Zags


1 Answers

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

like image 76
Zags Avatar answered Jun 10 '26 21:06

Zags



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!