Source Code Custom Message SSH Before Login Prompt in Linux

emailx45

Staff member
Premium
Joined
May 5, 2008
Messages
2,477
Reaction score
2,211
Location
here and there
Custom Message SSH Before Login Prompt in Linux
Ivan Revelli - 15/May/2020
[SHOWTOGROUPS=4,20]

View attachment 1587



Tested on Ubuntu 18.04 Server.

The file /etc/issue.net is a text file which contains a message or system identification to be printed before the login prompt of a telnet session. It may contain various ‘%-char’ (or, alternatively, ‘\-char’) sequences.

The common char for output some informations are:

1
2
3
4
5
6
7
8
9
10
11
12
13
b Insert the baudrate of the current line.
d Insert the current date.
s Insert the system name, the name of the operating system.
l Insert the name of the current tty line.
m Insert the architecture identifier of the machine, e.g., i686.
n Insert the nodename of the machine, also known as the hostname.
o Insert the domainname of the machine.
r Insert the release number of the kernel, e.g., 2.6.11.12.
t Insert the current time.
u Insert the number of current users logged in.
U Insert the string "1 user" or "<n> users" where <n> is the
number of current users logged in.
v Insert the version of the OS, e.g., the build-date etc.

If you want to display your IP Configuration you can simply add the following line to the issue file:

1My IP address: \4{eth0}


[/SHOWTOGROUPS]
 
Top