0599.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Add a Logon Warning Notification to Linux</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <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">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Add a Logon Warning Notification to Linux">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Add a Logon Warning Notification to Linux</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Log into the Linux device</li>
  26. <li>Run the following command in a terminal
  27. <div class="codeBlock"># create the logon notification text<br />
  28. sudo nano /etc/logon-warning.txt</div>
  29. </li>
  30. <li>Enter the text to be displayed during logon, below is an example
  31. <pre>
  32. ******************************* WARNING *******************************
  33. * *
  34. * This system is intended for use by authorized users only. *
  35. * Unauthorized or improper use of this system is strictly prohibited. *
  36. * *
  37. ***********************************************************************
  38. </pre>
  39. <p> </p>
  40. </li>
  41. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  42. <li>Continue with the following command in terminal
  43. <div class="codeBlock"># edit ssh config file<br />
  44. sudo nano /etc/ssh/sshd_config</div>
  45. </li>
  46. <li>Press CTRL+W and search for Banner</li>
  47. <li>Uncomment the Banner line by removing the #</li>
  48. <li>Enter the path to the logon-warning.txt file as the value
  49. <p>Banner /etc/logon-warning.txt</p>
  50. </li>
  51. <li>Press CTRL+O, Enter, CTRL+X to write the changes</li>
  52. <li>Continue with the following command in terminal
  53. <div class="codeBlock"># restart the ssh server<br />
  54. sudo systemctl restart ssh*</div>
  55. </li>
  56. <li>That&#39;s it, try connecting to a new session and the logon warning message should be displayed</li>
  57. </ol>
  58. </div>
  59. </div>
  60. </body>
  61. </html>