- EC2 사용자 데이터2024년 12월 24일
- wngnl05
- 작성자
- 2024.12.24.오후01:26
Port번호 & PassWord
#!/bin/bash echo 'Port (포트 번호)' >> /etc/ssh/sshd_config systemctl restart sshd sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config echo "<AMI 이름>:<비밀번호>" | chpasswd systemctl restart sshd
AWS 자격증명
mkdir /home/ec2-user/.aws touch /home/ec2-user/.aws/credentials touch /home/ec2-user/.aws/config chmod 777 /home/ec2-user/.aws/ chmod 777 /home/ec2-user/.aws/credentials chmod 777 /home/ec2-user/.aws/config cat <<EOF >> /home/ec2-user/.aws/credentials [default] aws_access_key_id = <KEY_ID> aws_secret_access_key = <SECRET KEY ID> EOF cat <<EOF >> /home/ec2-user/.aws/config [default] region = ap-northeast-2 output = json EOF
'Aws' 카테고리의 다른 글
EC2 Python 설치 (0) 2024.12.24 Jenkins 설치하기 (0) 2024.12.24 Lambda 특정 태그를 가진 Instance 종료하기 (0) 2024.12.24 AWS Nuke를 사용해서 AWS 리소스 모두 삭제하기 (0) 2024.12.24 EC2 Docker 설치하기 (0) 2024.12.24 다음글이전글이전 글이 없습니다.댓글
스킨 업데이트 안내
현재 이용하고 계신 스킨의 버전보다 더 높은 최신 버전이 감지 되었습니다. 최신버전 스킨 파일을 다운로드 받을 수 있는 페이지로 이동하시겠습니까?
("아니오" 를 선택할 시 30일 동안 최신 버전이 감지되어도 모달 창이 표시되지 않습니다.)