본문 바로가기
Q&A2023년 9월 21일1분 읽기

SSH 하드닝 2023년 최신 가이드

전
전민규
조회 837댓글 1

2023년 기준 SSH 보안 강화를 위한 최신 가이드를 알려주세요.

댓글 1

김김영삼3년 전

2023년 SSH 하드닝 가이드:

# /etc/ssh/sshd_config

# 1. 키 인증만 허용
PasswordAuthentication no
PubkeyAuthentication yes
PermitRootLogin no

# 2. 최신 알고리즘만
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
HostKeyAlgorithms ssh-ed25519

# 3. 접근 제한
AllowUsers deploy admin
MaxAuthTries 3
LoginGraceTime 20

# 4. 기타
X11Forwarding no
AllowTcpForwarding no
ClientAliveInterval 300
ClientAliveCountMax 2

추가:

  • Ed25519 키 사용 (RSA보다 안전, 짧음)
  • fail2ban 설치
  • 포트 변경 (선택)
Ctrl+Enter로 등록