Skip to content
IROSG.
Articles

Practical SSH hardening with keys, MFA, allowlists and useful logs

A practical source-backed IROSG technical guide.

Practical SSH hardening with keys, MFA, allowlists and useful logs

Scope

This original IROSG guide covers سخت‌سازی دسترسی SSH در Linux و مدیریت lifecycle کلیدها using the cited primary documentation.

Core model

SSH مرز مدیریتی مهمی است. key-based auth ریسک password brute force را کم می‌کند، اما کلید بدون expiry، owner و revoke path خودش credential ماندگار است. hardening باید authentication، authorization، network exposure و logging را هم‌زمان ببیند.

Practical workflow

Password login را بعد از تست key خاموش کنید، root login مستقیم را محدود کنید، AllowUsers/Groups را به نقش‌های واقعی وصل کنید و MFA یا bastion را برای سطح حساس اضافه کنید. logها را به SIEM مرکزی بفرستید.

Failure modes

Lockout مدیران رایج‌ترین failure تغییر sshd است. قبل از reload یک session دوم باز نگه دارید و sshd -t را اجرا کنید. key مشترک بین چند نفر نیز attribution را از بین می‌برد.

Lab

یک کاربر محدود بسازید، login key را فعال و password را غیرفعال کنید. سپس یک key را revoke کنید و ببینید audit log چه اطلاعاتی برای attribution دارد.

Production method

Capture a baseline, change one variable at a time, test positive and negative paths, keep evidence, and rehearse rollback before broad rollout.

TRACEABLE KNOWLEDGE

Sources & further reading

01
Red Hat — منبع اصلیhttps://www.redhat.com/en/blog/eight-ways-secure-ssh

Editorial review date:

IROSG / EDITORIAL

News and pioneer profiles use original writing with source attribution. Image credits and licenses are kept in each page’s sources section instead of beneath the images. CVE reference data credits its primary sources.

Editorial and image policy ↗

Keep exploring.

Articles ↗
VyOS network operating systemArticles
Networking

VyOS network operating system

Original Persian technical editorial based on the official sources below. It covers the subject, architecture, practical use cases, important limitations and defensive considerations.

1 min readRead story
Routinator RPKI validatorArticles
Networking

Routinator RPKI validator

Original Persian technical editorial based on the official sources below. It covers the subject, architecture, practical use cases, important limitations and defensive considerations.

1 min readRead story
ISC Kea DHCP High AvailabilityArticles
Networking

ISC Kea DHCP High Availability

Original Persian technical editorial based on the official sources below. It covers the subject, architecture, practical use cases, important limitations and defensive considerations.

1 min readRead story