123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Add a Logon Warning Notification to Linux</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Linux Logon Message,Linux Message of the Day,Linux Logon Warning,Debian,Ubuntu,Linux,Logon,Warning,Message,Notification,SSH,Linux Tutorial,Linux MOTD,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Add a Logon Warning Notification to Linux">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Add a Logon Warning Notification to Linux</h1>
- </div>
- <div></div>
- <div id="content">
- <ol>
- <li>Log into the Linux device</li>
- <li>Run the following command in a terminal
- <div class="codeBlock"># create the logon notification text<br />
- sudo nano /etc/logon-warning.txt</div>
- </li>
- <li>Enter the text to be displayed during logon, below is an example
- <pre>
- ******************************* WARNING *******************************
- * *
- * This system is intended for use by authorized users only. *
- * Unauthorized or improper use of this system is strictly prohibited. *
- * *
- ***********************************************************************
- </pre>
- <p> </p>
- </li>
- <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
- <li>Continue with the following command in terminal
- <div class="codeBlock"># edit ssh config file<br />
- sudo nano /etc/ssh/sshd_config</div>
- </li>
- <li>Press CTRL+W and search for Banner</li>
- <li>Uncomment the Banner line by removing the #</li>
- <li>Enter the path to the logon-warning.txt file as the value
- <p>Banner /etc/logon-warning.txt</p>
- </li>
- <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
- <li>Continue with the following command in terminal
- <div class="codeBlock"># restart the ssh server<br />
- sudo systemctl restart ssh*</div>
- </li>
- <li>That's it, try connecting to a new session and the logon warning message should be displayed</li>
- </ol>
- </div>
- </div>
- </body>
- </html>
-
|