How to change the SSH Banner on Ubuntu

Linux-LogoWe are getting a welcome message when we are connecting to our server through ssh client. Generally the message is of 3 lines as below.





We can eaisly modify the message as our requirement. To modify the message we have to edit two files named “/etc/motd” and “/etc/ssh/sshd_config”

Add the below lines (You can modify the messages as your requirement.)

After saving the file we will create a symlink

To remove the last login information we have to edit the sshd_config file.

Find the below line and make the value no

Finally we have to restart the sshd service

Now connect to your server through ssh client and you should able to see the welcome message like below.


The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply