In the 2017 World tournament, there is a problem, record the operation process.
Set the login banner can modify the/etc/issue file, the contents of the file is:
- Debian Gnu/linux 9 \ \l*
where \ n and \l are escape characters, execute the man pam_issue command to see what these escape characters mean:
Therefore, to achieve the banner required in the topic, you can modify the/etc/issue file as follows:
Then log in locally for the test effect:
Note that, by default, the/etc/issue file can only affect the local login, and the topic requires remote login to implement the same banner, which requires the modification of the SSH configuration file/etc/ssh/sshd_config, In line 110th, specify the banner of SSH as/etc/issue
Then restart the service to take effect systemctl restart sshd
But here is still a problem, that is, in the remote login can not be escaped, but the original output, looked up some information and no results, temporarily can only be shelved.
Settings for Linux login banner