이번엔 EC2에 로그인 시 키페어와 비밀번호 모두 사용해 EC2에 접속가능하게 해보려 합니다. Userdata#!/bin/bashsed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_configsystemctl restart sshdecho 'Skill53##' | passwd --stdin ec2-userecho "AuthenticationMethods publickey,password" >> /etc/ssh/sshd_configsystemctl restart sshd Resultssh ec2-user@ -i "" 모두 올바르다면 아래의 사진과 같이 접속에 성공하는 모습을 볼수 있습니다. 하지만 둘 중 하나라도 실패..