Describe the bug
Pressing Ctrl+C during an active SSM session kills the local ztictl process instead of interrupting the remote command, which drops the session unexpectedly.
To Reproduce
- Run
ztictl ssm connect <instance-id> --region <region>.
- Execute a long-running command on the remote instance (for example
sleep 60).
- Press
Ctrl+C.
- The SSM session disconnects instead of just stopping the remote command.
Expected behavior
Pressing Ctrl+C should interrupt the remote command while keeping the SSM session alive.
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Shell: bash
- AWS CLI Version: 2.x
- SSM Plugin Version: bundled with AWS CLI v2
Output of tool check command
ssm check
✔ AWS CLI installed
✔ Session Manager plugin installed
✔ AWS credentials valid
✔ SSM endpoints reachable
Additional context
This was caused by missing signal handling in the parent Go process, and was fixed by capturing SIGINT/SIGTERM and allowing them to pass through to the AWS CLI subprocess.
Describe the bug
Pressing
Ctrl+Cduring an active SSM session kills the localztictlprocess instead of interrupting the remote command, which drops the session unexpectedly.To Reproduce
ztictl ssm connect <instance-id> --region <region>.sleep 60).Ctrl+C.Expected behavior
Pressing
Ctrl+Cshould interrupt the remote command while keeping the SSM session alive.Environment (please complete the following information):
Output of tool check command
Additional context
This was caused by missing signal handling in the parent Go process, and was fixed by capturing SIGINT/SIGTERM and allowing them to pass through to the AWS CLI subprocess.