Skip to content

Instantly share code, notes, and snippets.

@eodenyire
Forked from AbdullahGhani1/DisableRootLogin.md
Created August 29, 2022 23:19
Show Gist options
  • Select an option

  • Save eodenyire/be70e90571dde5ac75c67d11e4d67092 to your computer and use it in GitHub Desktop.

Select an option

Save eodenyire/be70e90571dde5ac75c67d11e4d67092 to your computer and use it in GitHub Desktop.
Disable Root Login -KodeKloud

Disable Root Login

After doing some security audits of servers, xFusionCorp Industries security team has implemented some new security policies. One of them is to disable direct root login through SSH. Disable direct SSH root login on all app servers in Stratos Datacenter.

Click on ✔ and Do Task Again

Solution:-

Open Three Terminal and ssh on all App server

on Terminal one
ssh tony@stapp01  
on Terminal Two
ssh steve@stapp02
on Terminal three
ssh banner@stapp03
Run the below command on each app server and Search for #PermitRootLogin yes
sudo vi /etc/ssh/sshd_config
Remove the "#" and change "yes" to "no" according to image

image

sudo systemctl restart sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment