Article 6HV2N /etc/issue.net print out a warning message to sshed users & log their ip

/etc/issue.net print out a warning message to sshed users & log their ip

by
englishexe
from LinuxQuestions.org on (#6HV2N)
So I have just installed Debian Linux (CLI) onto a spare laptop acting as a mini server and to "scare" off intruders I want to output something along the lines of:
Code:===========================================================
--- Unauthorised Access Is Prohibited ---
--- It is against the law to secure unauthorised access ---
--- (Computers Misuse Act 1990) ---
===========================================================
This connection has been logged. (\4)

= Metrics =
Users logged in: \u

= Machine =
Debian 12 (\s) (v\r)The issue I'm noticing is that when physically using the computer it outputs correctly with the correct information but when SSHing in (tried pUTTY and normal Windows Command line) it outputs the literal text ("\u" instead of ("1") how can I fix this?

I also would like to save the user's IP in a file so I can block them from my network if they attempt to log in

Thanks
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments