Skip to content

Instantly share code, notes, and snippets.

@aduzsardi
Created July 25, 2017 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aduzsardi/b34aeb244a5fcc4302d8237144eb59ed to your computer and use it in GitHub Desktop.
Save aduzsardi/b34aeb244a5fcc4302d8237144eb59ed to your computer and use it in GitHub Desktop.
disable root login with password
#You can do this using the PermitRootLogin directive. From the sshd_config manpage:
#
# Specifies whether root can log in using ssh(1). The argument must be “yes”, “without-password”, “forced-commands-only”, or “no”. The default is “yes”.
#
# If this option is set to “without-password”, password authentication is disabled for root.
#
#The following will accomplish what you want:
PasswordAuthentication yes
PermitRootLogin without-password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment