Skip to content

LinuxBabu ...........

Linux System Admin Blog….

  • About
  • Contact

disable root login

How to disable root login through SSH.

July 5, 2008 by dino

Before you do this make sure you have created another user in the wheel group.

To disable root login through ssh, edit the following file:

# /etc/ssh/sshd_config

browse to the following line:

PermitRootLogin yes

and change to:

PermitRootLogin no

Save the file and restart ssh.

# /etc/init.d/ssh restart

If you are ssh’d into the server with root when this is done, your connection will fail on the restart of ssh.

Categories Uncategorized Tags disable root login Leave a comment

Categories

  • Basics
  • CloudLinux
  • Command Line
  • cPanel
  • DirectAdmin
  • OpenVZ
  • OS X
  • Parallels Cloud Server
  • PCI Compliance
  • Plesk
  • Uncategorized
  • Virtuozzo
  • WebMin
  • Wordpress

Tags

Add IP apache apf bind IP centos cPanel cpanel freebsd DDos debain Debian add IP DirectAdmin DNS eAccelerator exim fdisk firewall freebsd FreeBSD Quota fstab horde IP address in FreeBSD iptables kernel linux mail mysql MySQL Optimization named OpenBSD perl php phpMyAdmin pkg_add Plesk Plesk Upgrades redhat rvsitebuilder Securing MySQL SMTP sshd Virtuozzo VPS WHM WHMCS windows

Recent Posts

  • cPanel :: Change nameservers for all zone files using command line
  • (no title)
  • Norton blacklisted my website and it is CLEAN!
  • CentOS 7 :: /var/log/messages , cron , secure log files empty
  • Plesk Onyx 17.8 :: Backup Error :: Errcode: 24 – Too many open files
© 2025 LinuxBabu ........... • Built with GeneratePress