ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

SSH: key login, hardening sshd_config

Lesson 7.59 minIntermediateDecember 1, 2026

Sign in to read this lesson

SSH is the main door into a server, and every internet-facing server sees dozens of password attempts a second. In this lesson we learn to replace passwords with keys, block root logins, change sshd_config safely, move the SSH port together with SELinux and firewalld, and make daily work easier with ~/.ssh/config.

What you will learn

  • A key pair: ssh-keygen -t ed25519; ssh-copy-id ops1@srv-db01 copies the public key to the server (~/.ssh/authorized_keys).
  • Permissions: ~/.ssh — 700, authorized_keys — 600, the private key — 600; with wrong permissions sshd rejects the key.
  • Hardening: PermitRootLogin no, PasswordAuthentication no (after the key works), MaxAuthTries 3, AllowGroups wheel sshusers.
  • Write settings to /etc/ssh/sshd_config.d/*.conf, check with sshd -t, systemctl reload sshd; do not close your open session.
  • Changing the port: Port 2222 + semanage port -a -t ssh_port_t -p tcp 2222 + firewall-cmd --add-port=2222/tcp.

The lesson has 5 key points, an explanation and 5 questions. It opens with a package.