文件及路径: /etc/motd
实例:
[root@A-client ~]# ssh -p 22 test@10.0.0.2 test@10.0.0.2's password: Last login: Thu Jan 24 11:00:13 2019 from 10.0.0.1 Welcome to SERVER1 SERVER1 comes from 广州天翼云ECS [test@SERVER1 ~]$ [test@SERVER1 ~]$ sudo su - 上一次登录:四 1月 24 10:58:01 CST 2019pts/0 上 [root@SERVER1 ~]# cat /etc/motd Welcome to SERVER1 SERVER1 comes from 广州天翼云ECS
提示信息也可以在 远程主机的 /etc/ssh/sshd_config 中定义(需重启服务才会生效),但习惯和方便,一般在 /etc/motd 文件中定义即可。