문서의 이전 판입니다!
# "my-key-pair" 라는 이름으로 key pair 생성하고, 개인키를 파일로 저장 aws ec2 create-key-pair --key-name my-key-pair --query "KeyMaterial" --output text > my-key-pair.pem # 개인키 권한 설정 chmod 400 my-key-pair.pem
chmod 400 /path/my-key-pair.pem ssh -i /path/my-key-pair.pem ec2-user@ec2인스턴스주소
/etc/ssh/sshd_config에서 PasswordAuthentication yes 설정이 필요한데, AWS 상의 Linux 들은 이 파일을 재부팅할 때마다 /etc/cloud/* 의 설정을 기반으로 항상 덮어써 버린다.sshd_config 설정을 해줄 수 있다. ssh_pwauth: true는 PasswordAuthentication yes 를 생성한다.sudo sed -i -e "s/ssh_pwauth: false/ssh_pwauth: true/g" /etc/cloud/cloud.cfg.d/00_defaults.cfg