【问题标题】:Have SSM start-session use bash让 SSM 开始会话使用 bash
【发布时间】:2021-01-24 00:35:58
【问题描述】:

我正在使用 AWS Simple Session Manager 和 AWS CLI 来通过 SSH 连接到实例。当我调用aws ssm start-session --target INSTANCE_ID 时,它会在服务器上启动sh,而不是bash。有没有办法自定义在实例启动时运行的命令?

【问题讨论】:

    标签: amazon-web-services aws-ssm


    【解决方案1】:

    您可以使用 AWS 提供的配置文档来执行此操作,如下所示:

    aws ssm start-session --target INSTANCE_ID --document-name AWS-StartInteractiveCommand --parameters command="bash -l"

    来源:a github issue on the topic

    【讨论】:

      猜你喜欢
      • 2021-06-06
      • 1970-01-01
      • 2010-11-09
      • 2021-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多