본문 바로가기

AWS/AWS - Dev Associate

[AWS Dev A] EC2 - Mac에서 SSH 구현

이번시간에는 윈도우에서 SSH 구현하는 방법에 대해서 알아보겠습니다.

 

 

설치확인 후 파일위치, 아이피 주소등을 미리 확인해서 아래 처럼 명령어를 입력합니다.

 

 

 ~/Desktop/workspace/AWS> ll
total 8
-rw-r--r--@ 1 mike  staff   1.6K Dec 26 23:22 EC2_mike_Virginia.pem

 ~/Desktop/workspace/AWS> chmod 0400 EC2_mike_Virginia.pem

 ~/Desktop/workspace/AWS> ll
total 8
-r--------@ 1 mike  staff   1.6K Dec 26 23:22 EC2_mike_Virginia.pem

 ~/Desktop/workspace/AWS> ssh -i EC2_mike_Virginia.pem ec2-user@34.201.52.248
The authenticity of host '34.201.52.248 (34.201.52.248)' can't be established.
ED25519 key fingerprint is SHA256:MjkYrH9zneelE4l4a6cC9DY0hofOW4/pFEOKriBd28g.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '34.201.52.248' (ED25519) to the list of known hosts.
Last login: Mon Dec 26 21:30:10 2022 from 95.74.109.77

       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[ec2-user@ip-172-31-81-210 ~]$ ll
total 0
[ec2-user@ip-172-31-81-210 ~]$ ls -al
total 12
drwx------ 3 ec2-user ec2-user  74 Dec 22 23:20 .
drwxr-xr-x 3 root     root      22 Dec 22 23:20 ..
-rw-r--r-- 1 ec2-user ec2-user  18 Jul 15  2020 .bash_logout
-rw-r--r-- 1 ec2-user ec2-user 193 Jul 15  2020 .bash_profile
-rw-r--r-- 1 ec2-user ec2-user 231 Jul 15  2020 .bashrc
drwx------ 2 ec2-user ec2-user  29 Dec 22 23:20 .ssh
[ec2-user@ip-172-31-81-210 ~]$