1. aws 에서 받은 key-pair 공개키 확인하기
Xshell
// .ssh 폴더로 이동
ubuntu@worker1:~$ cd .ssh
// 폴더 안에 authorized_keys 파일 확인
ubuntu@worker1:~/.ssh$ ls
authorized_keys
// autorized_keys 내용 출력 - 본인 공개키확인
ubuntu@worker1:~/.ssh$ cat authorized_keys
ssh-rsa~~~key
// 경로확인
ubuntu@worker1:~/.ssh$ pwd
/home/ubuntu/.ssh
2. 윈도우 명령프롬프트에서 ssh-key 생성
// ssh-key 만들기 -> fingerprint~~나올때까지 enter
C:\Users\admin>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\admin/.ssh/id_rsa):
Created directory 'C:\Users\admin/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\admin/.ssh/id_rsa.
Your public key has been saved in C:\Users\admin/.ssh/id_rsa.pub.
The key fingerprint is:
// dir 명령어로 .ssh 있나 확인
C:\Users\admin>dir
Directory of C:\Users\admin
2022-02-16 오후 05:01 <DIR> .ssh
// .ssh 폴더안에 키 생성됐나 확인
C:\Users\admin>dir .ssh
Directory of C:\Users\admin\.ssh
2022-02-1 오후 05:01 2,610 id_rsa
2022-02-1 오후 05:01 576 id_rsa.pub
// private키 (개인키)
C:\Users\admin>notepad .ssh/id_rsa
// public키 (공개키) .pub
C:\Users\admin>notepad .ssh/id_rsa.pub