Liangxu Linux
Liangxu Linux
Jan 2, 2025 · Information Security

How to Block SSH Logins for Specific Users, Groups, and IP Ranges on Linux

This guide explains multiple Linux techniques—setting a user’s shell to /sbin/nologin, editing /etc/passwd, configuring sshd_config with Allow/Deny directives, and using hosts.allow/hosts.deny—to prevent unwanted SSH access for particular users, groups, or IP addresses, and shows how to apply the changes safely.

LinuxSSHhosts.allow
0 likes · 11 min read
How to Block SSH Logins for Specific Users, Groups, and IP Ranges on Linux
Liangxu Linux
Liangxu Linux
Jun 29, 2024 · Information Security

How to Block SSH Logins for Specific Users, Groups, and IPs on Linux

This guide explains multiple Linux techniques—including nologin shells, sshd_config allow/deny lists, and hosts.allow/hosts.deny rules—to prevent selected users, groups, or IP addresses from logging in via SSH, with practical commands, examples, and a ready‑to‑run script.

LinuxSSHSecurity
0 likes · 11 min read
How to Block SSH Logins for Specific Users, Groups, and IPs on Linux
Liangxu Linux
Liangxu Linux
Jan 16, 2024 · Operations

How to Prevent SSH Session Freezes: Keep Your Remote Connections Alive

Learn why SSH connections drop due to TCP timeout settings and follow step‑by‑step Linux, Windows (PuTTY), and server‑side configurations—including tcp_keepalive and ServerAlive options—to keep remote sessions active and avoid idle‑disconnects for developers.

KeepaliveLinuxPutty
0 likes · 8 min read
How to Prevent SSH Session Freezes: Keep Your Remote Connections Alive
Open Source Linux
Open Source Linux
Jul 27, 2022 · Information Security

How to Harden SSH on Linux: 8 Essential Security Steps

This guide explains why the default SSH configuration on Linux is risky and provides eight concrete hardening measures—including disabling root login, changing the default port, enforcing key‑based authentication, limiting login attempts, and restricting access by IP—to secure your server against common attacks.

Linux SecurityServer Hardeningaccess control
0 likes · 8 min read
How to Harden SSH on Linux: 8 Essential Security Steps
ITPUB
ITPUB
Apr 19, 2016 · Information Security

How to Disable Root SSH Login on Linux for Better Security

This guide explains why allowing root SSH access is risky, shows how to edit the sshd_config file to set PermitRootLogin no, restart the SSH service, verify the restriction, and optionally allow specific users or re‑enable root login when needed.

LinuxRootLoginSSH
0 likes · 5 min read
How to Disable Root SSH Login on Linux for Better Security