C.W.K.
Stream
Lesson 04 of 12 · published

키 생성

~15 min · ssh-keygen, ed25519, passphrase, rsa

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

페어 생성하기

ssh-keygen 이 페어 만들어. ed25519 써 — 모던하고 빠르고 짧고, 큰 RSA 만큼 안전. -C comment 가 critical — 몇 달 뒤 access 감사할 때 authorized_keys 에서 보일 줄이라서, 장치 분명히 식별하게 적어.

Ed25519 가 RSA 이기는 이유

속성ed25519RSA
키 크기256 비트3072–4096 비트
보안 레벨~128 비트3072 에서 ~128 비트
Sign/verify 속도매우 빠름느림, 특히 4096
Public key 길이~80 자~700 자
알고리즘Curve25519 위 EdDSARSA 인수분해

오늘 새 RSA 키 생성할 이유 없어. 예외 — legacy 알고리즘에 핀된 옛날 서버. 그 외 다 ed25519.

파일 이름 짓기

기본으로 ssh-keygen -t ed25519~/.ssh/id_ed25519 에 씀. 특정 용도 (회사 GitHub, 특정 클라우드) 별도 키 원하면 -f 로 명시 — 그다음 ~/.ssh/config 에서 host 별로 가리켜.

Code

페어 생성·bash
# Standard generation — set a passphrase when prompted
ssh-keygen -t ed25519 -C "you_username@macbook-2026"

# Named key for GitHub specifically
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_github -C "github-personal"

# Look at what got created
ls -la ~/.ssh/id_ed25519*

# Show the fingerprint of a key
ssh-keygen -lf ~/.ssh/id_ed25519.pub

External links

Exercise

이 맥에 ed25519 키 없으면 지금 생성 — ssh-keygen -t ed25519 -C "$(whoami)@$(hostname -s)-$(date +%Y)". Passphrase 설정 (기억할 만한 거). ls -la ~/.ssh/id_ed25519* 로 private (mode 600) 와 public (mode 644) 둘 다 있는지 확인. ssh-keygen -lf ~/.ssh/id_ed25519.pub 로 fingerprint 봐 — 서버가 네 키를 식별하는 방법.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.