4

While using lynis, I was suggested to add an legal banner.So

What is a legal banner?
How do I add it to /etc/issue and /etc/issue.net?

Registered User
  • 9,521
  • 14
  • 53
  • 85

1 Answers1

8

One of the easiest way to protect and secure SSH logins by displaying warming message to UN-authorized users or display welcome or informational messages to authorized users.

A legal banner contains some security warning information or general information, that alerts the user. It can be used for security, legal info, company policy, etc.

One way to display messages is using issue.net file. issue.net : Display a banner message before the password login prompt.

To display Welcome or Warning message for SSH users before login. Use issue.net file to display a banner massages. Open the following file with the editor.

vi /etc/issue.net

Add the banner message of your choice, and save the file. Next you would open the master ssh configuration file and enable banners.

vi /etc/ssh/sshd_config

Search for the word “Banner” and uncomment out the line and save the file.

#Banner /some/path

It should be like this.

Banner /etc/issue.net (you can use any path you want)

Next, restart the SSH daemon to reflect new changes.

/etc/init.d/sshd restart

Now try to connect to server you will see banner message you just added.

Source:Tecmint

Mitch
  • 106,657
  • 24
  • 210
  • 268
  • Two queries. first, when I open /etx/issue.net, it contains **Ubuntu 12.10 \n \l**.Should I keep it or not? second, /etc/ssh/sshd_config does not exist.the command open new file.Note that I'm using ubuntu 12.10 – Registered User Feb 14 '14 at 09:19
  • Try this. On the first point keep what's in the file, and then on the second, add the banner line `Banner /etc/issue.net (you can use any path you want)`, and let me know. – Mitch Feb 14 '14 at 11:07
  • It works in CLI mode, but not in GUI mode.Is it meant to be this way? – Registered User Feb 17 '14 at 06:45
  • 2
    Banners are mostly used in severs, and since Linux servers are CLI it would make sense. – Mitch Feb 17 '14 at 07:12