Task 4: Disable Root Login

Hi, I disabled the root login as requested in the task, yet I failed when I submitted it which was strange to. Below are the steps i used;

  1. tony@stapp01 ~: sudo su
  2. root@stapp01 tony]: whomai
    root
  3. root@stapp01 tony]: cd /etc
  4. root@stapp01 etc] : cd ssh
  5. root@stapp01 ssh] :vi sshd.config
  6. then set PermitRootLogin to (no)
  7. saved changes with esc+:wq
  8. root@stapp01 ssh] systemctl restart sshd

I did the same for the other 2 app servers (i.e. Steve and Banner)


I will like to know why i failed this task please. Attached are my screen!

1 Like

You have to remove hash(#) symbol before PermitRootLogin and restart sshd service.

PermitRootLogin no

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

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