Mac, Linux 그리고 Windows 10 이상 운영체제(10 이하는 Putty)에서 사용할 수 있는 SSH는 명령줄 인터페이스 도구이다.
터미널을 이용해서 원격 머신 혹은 서버를 제어할 수 있는 기능이다.
EC2를 생성하면서 내려받은 .pem
위치에서 ssh -i [your pem] ec2-user@[IPv4주소]
명령어 실행한다.
다음과 같은 에러가 발생할 수 있는데
Permissions 0644 for 'EC2Tutorial.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "EC2Tutorial.pem": bad permissions
chmod 0400 [your pem]
명령어를 통해 권한을 바꾸고
ssh -i [your pem] ec2-user@[IPv4주소]
명령어를 재실행하면 다음과 같이 작동하는 것을 볼 수 잇다.
, #_
~\\_ ####_ Amazon Linux 2
~~ \\_#####\\
~~ \\###| AL2 End of Life is 2026-06-30.
~~ \\#/ ___
~~ V~' '->
~~~ / A newer version of Amazon Linux is available!
~~._. _/
_/ _/ Amazon Linux 2023, GA and supported until 2028-03-15.
_/m/' <https://aws.amazon.com/linux/amazon-linux-2023/>