# Creates a colorful & informative "message of the day (motd)".# Save as /etc/profile.d/motd.sh

# Setting variables for ANSI colors

White="\033[01;37m"Green="\033[01;34m"Green="\033[0;32m"

# Displaying colorful info: hostname, OS, kernel and username.

echoecho -e "$Green===================================================$GreenWelcome to $White$(hostname)$Green.This system is running $White$(cat /etc/redhat-release)$Green.Kernel version $White$(uname -r)$Green.You're currently logged in as $White$(whoami)$Green.$Blue===================================================$Blue"echo

Use any non root account for ssh and
then switch (su–) to root account.
Here's how you can do this:

#
nano /etc/ssh/sshd_config PermitRootLogin no

3.Disable password based authentication

Instead use public/private key pair
only. You can do this:

#
nano /etc/ssh/sshd_config PasswordAuthentication no

Passwordless SSH key-based authentication

3.1. What is key-based, passwordless SSH
authentication?

ØSetting
up SSH keys for passwordless authentication is a preferred, quick and painless
authentication mechanism on CentOS Linux, and many other SSH based systems. It
also allows you to set up automated tasks, such as copying backups to another
server, without having to enter a password.

3.2. Configuring key-based, passwordless SSH
authentication

ØIn
this scenario, we have two servers: rm.linux.lan
and cl.linux.lan We
want to grant passwordless, key-based authentication from the root user
on rm.linux.lan to
the root user on cl.linux.lan

ØAssuming
these keys do not exist yet, we generate our public and private key pair
on rm.linux.lan