How to add multiple keys for elastic beanstalk instance?

前端 未结 8 1336
青春惊慌失措
青春惊慌失措 2020-12-23 17:05

There is a very good question on [How to] SSH to Elastic [an] Beanstalk instance, but one thing I noticed is that, through this method, it is only possible to add one SSH ke

8条回答
  •  不思量自难忘°
    2020-12-23 17:26

    To create a file named .ebextensions/authorized_keys.config is another way to do it.

    files:
      /home/ec2-user/.ssh/authorized_keys:
        mode: "000400"
        owner: ec2-user
        group: ec2-user
        content: |
          ssh-rsa AAAB3N...QcGskx keyname
          ssh-rsa BBRdt5...LguTtp another-key
    

    The name of file authorized_keys.config is arbitrary.

提交回复
热议问题