sshd 자동 체크
ssh-audit 이 SSH 서버 연결해 advertising 알고리즘 보고, 약하거나 deprecated 된 거 flag. 네트워크 쪽에서 hardening 검증하는 싸고 자동인 방법 — sshd_config 읽고 어느 cipher 가 나쁜지 기억할 필요 X. 도구가 알아.
~10 min · ssh-audit, scanning, weak-algorithms
ssh-audit 이 SSH 서버 연결해 advertising 알고리즘 보고, 약하거나 deprecated 된 거 flag. 네트워크 쪽에서 hardening 검증하는 싸고 자동인 방법 — sshd_config 읽고 어느 cipher 가 나쁜지 기억할 필요 X. 도구가 알아.
# Install
pip install ssh-audit
# or
brew install ssh-audit
# Audit your own server
ssh-audit 192.168.1.100
# Non-default port
ssh-audit 192.168.1.100:2222
# Batch — fleet-wide audit
for host in $(cat ~/.fleet/all.txt); do
echo "=== $host ==="
ssh-audit "$host" 2>&1 | tail -30
done
# Output uses colors:
# green/✓ good algorithm or setting
# yellow/⚠ acceptable but not ideal
# red/✗ weak — fix it# Modern, restrictive
KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
# Validate and restart
sudo sshd -t
sudo systemctl restart sshd
# Re-run ssh-audit
ssh-audit 192.168.1.100ssh-audit 실행. 빨강이나 노랑 보이는 거 메모. 각각 조사 — 합법 trade-off (호환성 위한 legacy cipher 필요) 또는 실제 drift? 위 batch 스크립트를 cron 에 주간, 자기 메일로. 이제 어느 서버 자세 drift 하는 순간 알아.아직 댓글이 없어요. 첫 댓글을 남겨보세요.