C.W.K.
Stream
Lesson 01 of 14 · published

Password 인증 비활성화

~12 min · sshd, passwordauth, kbdinteractive, lockout

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

가장 큰 단일 보안 승리

Fleet 의 모든 장치에 SSH 키 설치된 후 (Track 2), 모든 서버에서 password 인증 완전히 끄기. 프로토콜 레벨에서 brute-force 제거 — 공격자가 추측할 게 없음. "강한 password 와 기도" 에서 "keys-only 와 auth log 비웃기" 로.

sshd_config 에 설정할 것

세 directive, 한 번 재시작, 끝. PasswordAuthentication no 가 plain password 끄기. KbdInteractiveAuthentication no 가 역사적으로 password 인증 backdoor 한 legacy keyboard-interactive flow 끄기. PubkeyAuthentication yes 가 키 인증 명시 활성.

Code

sshd_config — password 인증 비활성·bash
# Edit
sudo nano /etc/ssh/sshd_config

# Set:
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes

# Validate before restarting
sudo sshd -t

# Restart (Linux)
sudo systemctl restart sshd

# macOS — toggle Remote Login off/on in System Settings
신뢰 전 테스트·bash
# From a NEW terminal (keep the existing one open as lifeline)
ssh user@host
# Should authenticate via key, no password prompt

# Force a password attempt — should fail cleanly
ssh -o PreferredAuthentications=password \
    -o PubkeyAuthentication=no \
    user@host
# Expected: Permission denied (publickey).

External links

Exercise

통제하는 서버 하나에서 sshd_config 편집해 password 인증 비활성. 두 번째 터미널 먼저 활성 SSH 세션으로 열어. Validate (sudo sshd -t), 재시작, 그다음 새 터미널에서 테스트. ssh -o PreferredAuthentications=password 가 거부되는지 확인. Public 서버의 auth log 가 24 시간 안에 brute-force 노이즈 조용해져야.

Progress

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

댓글 0

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

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