Skip to content

AL2023 기본 authorized_keys의 forced-command가 bootstrap.sh의 root SSH 자동화(#642)를 무력화한다 #681

Description

@Khyojae

무엇이

Round B(풀 사이징 원인 분리, docs/decisions/pool-sizing-topology-isolation-design.md) 실행 중 발견.

AL2023 기본 AMI의 /root/.ssh/authorized_keys에 forced-command 항목(Please login as ec2-user...)이 이미 들어있어서, bootstrap.sh가 root SSH를 열려고 하는 로직(#642)이 실제로는 안 먹힌다 — 박스 간 SSH(예: 부하기→대상)가 이 항목 때문에 막힌다.

재현

  • ROLE=db/ROLE=app 등으로 AL2023 인스턴스를 부트스트랩
  • 다른 박스에서 ssh -i <key> root@<이 박스> 시도 → forced-command 메시지만 뜨고 실제 쉘이 안 열림
  • /root/.ssh/authorized_keys를 열어보면 command="..." 접두사가 붙은 줄이 남아있음

근거

미검증

  • 이게 모든 AL2023 AMI/리전에서 재현되는지, 아니면 이번 라운드에 쓴 특정 AMI에만 있던 것인지는 확인 안 함
  • bootstrap.sh가 이 줄을 감지하고 제거하도록 고쳐야 하는지, 아니면 다른 우회(예: ec2-user로 먼저 접속 후 sudo)가 맞는지는 미결정

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions