Skip to content

Instantly share code, notes, and snippets.

@AbdullahGhani1
Last active October 21, 2024 08:13
Show Gist options
  • Save AbdullahGhani1/63d4a2c7578a86da8e2dad54b4e4bd22 to your computer and use it in GitHub Desktop.
Save AbdullahGhani1/63d4a2c7578a86da8e2dad54b4e4bd22 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
@alaison-benny
Copy link

Good!

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