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

apache apf bind IP centos cPanel DDos DirectAdmin DNS DOS attack eAccelerator exim firewall fixquotas freebsd fstab horde iptables linux mail migration mysql named nameservers perl php phpMyAdmin phpPgAdmin Plesk Plesk Upgrades PostgreSQL qmail qmHandle recursion redhat Red Hat Network rhn_register rvsitebuilder SMTP sshd Virtuozzo VPS webmail 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