Skip to content

Instantly share code, notes, and snippets.

@AbdullahGhani1
Last active June 4, 2023 16:28
Show Gist options
  • Save AbdullahGhani1/a8194a8f68d0ee6f6cd066fa69ddde38 to your computer and use it in GitHub Desktop.
Save AbdullahGhani1/a8194a8f68d0ee6f6cd066fa69ddde38 to your computer and use it in GitHub Desktop.
LinuxBanner - kodekloud

LinuxBanner - kodekloud

During the monthly compliance meeting, it was pointed out that several servers in the Stratos DC do not have a valid banner. The security team has provided serveral approved templates which should be applied to the servers to maintain compliance. These will be displayed to the user upon a successful login. Update the message of the day on all application and db servers for Nautilus. Make use of the approved template located at /tmp/nautilus_banner || /home/thor/nautilus_banner on jump host

Click on ✔ and Do Task Again

Solution:

Open 5 Terminal

On Jump Server

/root/nautilus_banner || /home/thor/nautilus_banner As per task

sudo scp  /home/thor/nautilus_banner tony@stapp01:/home/tony
sudo scp  /home/thor/nautilus_banner steve@stapp02:/home/steve 
sudo scp  /home/thor/nautilus_banner banner@stapp03:/home/banner

on Nautilus DB Server

ssh peter@stdb01 
sudo yum install openssh-clients -y

on Jump Server

sudo scp /home/thor/nautilus_banner  peter@stdb01:/home/peter

SSh to db Server and each app Server

ssh tony@stapp01
ssh steve@stapp02
ssh banner@stapp03
ssh peter@stdb01

Type the below code on each app server

sudo mv nautilus_banner /etc/motd && sudo cat /etc/motd

you can ssh on each server to check the output

@presleyp84
Copy link

kindly add ssh peter@ stdb01 as we need to move banner to db server as well.

@hv004
Copy link

hv004 commented Mar 17, 2021

Why flag r is used in scp commnad ,since nautilus_banner is a file and not a directory.
scp -r /root/nautilus_banner tony@stapp01:/home/tony
Also , why "openssh-clients " sudo yum install openssh-clients -y has been installed? Is it not openssh-server?
Thanks

@martinthong125
Copy link

I agree with hv004.
For the db, the server does not have ssh command so have to install openssh.

@victordickson
Copy link

victordickson commented Feb 8, 2022

KIndly update by adding ssh peter@ stdb01 as well

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