linux 服务器登录显示lastlogin

1、参数修改:

/etc/ssh/sshd_config 问价里边的 printlastlog 设置为yes

/etc/ssh/sshd_config 问价里边的 printmotd 设置为yes

2、添加lastlog日子文件

/var/log/文件夹里边添加  lastlog文件。

3、添加登录欢迎语句

/etc/motd 文件中添加登录欢迎语句

原文地址:https://www.cnblogs.com/handongyu/p/5996918.html