前言

使用阿里云服务器的应该都注意到每次ssh登录后都能看见类似下面这样的欢迎语:

  1. Last login:xxxxxxxxxxxxx Welcome to Alibaba Cloud Elastic Compute Service ! [root@xxxx ~]#

我想如果阿里可以设置, 那么我们也是可以修改的, 通过查阅资料发现只需要修改 /etc/motd 文件即可

修改 /etc/motd

  1. vim /etc/motd

按i 进入编辑模式, 输入需要的欢迎语, 然后按 Esc 输入:wq 退出并保存, 然后重新登录即可看见

效果

  1. Last login: xxxxxxxxxxxx *** Welcome to xiaoming's Server! *** [root@xxxxx ~]#