Everyday, we login to many servers via SSH. Sometimes, we see some message once we logged into the server.
Have you ever wondered how these messages comes?
In which file, these messages are written?
How to modify these messages in the server?
This is very interesting thing. I am going to explain about this in this post. 🙂
There is one file called “motd” present in the location “/etc” folder, where you can add your custom message.
[root@ss ~]# ls -la /etc/motd
-rw-r–r– 1 root root 115 Feb 22 11:54 /etc/motd
Now open the file “motd” in your favourite editor, write your message and save the file. Now logout from the server and login again. You will see your message after successful login.
NOTE: By default, the file is empty.
Also you have a wheel user in your server, then you will see your message as soon as you logged into the server using your wheel user.Refer the below image for this:
My name is Shashank Shekhar. I am a Software Engineer, currently working in one of the leading web-hosting companies in India. I am having 2 years of experience in Linux Server Administration.
I love to work in Linux environment & love learning new things.
Powered by Facebook Comments