The task is to disable direct SSH root login on all app servers within the Stratos Datacenter
I can’t just go inside every server and move to ‘ssh_config file’ and add a line in VI editor ‘ROOT LOGIN disable’ so i create a for loop from the root user in jumphost but it got failed
How can i complete this task ?? Can anyone please explain i am a beginner in devops??
I don’t think this script would work.
You need to SSH into App Servers (stapp01, stapp02, and stapp03 only).
When you SSH into one of the App servers, you will SSH as the user configured for that server, tony@stapp01.
Then become root and update the sshd config.
But as this one has 3 App servers what if it had about more than 20-30 servers what about then ?? we can’t just go to each server and update the ssh config right ?? I
It asks for “app servers”. That is stapp01, stapp02 and stapp03 only.
On real infrastructure with a large number of servers, this would probably be done by Ansible.
