User Tools

Site Tools


How to change the ssh banner

- Change the prompt on the screen -

$nano /etc/issue

- Change the banner message when you logged -

$nano /etc/motd

The “/etc/issue” file accept escape sequences :

\b -- Baudrate of the current line.
\d -- Current date.
\s -- System name, the name of the operating system.
\l -- Name of the current tty line.
\m -- Architecture identifier of the machine, eg. i486
\n -- Nodename of the machine, also known as the hostname.
\o -- Domainname of the machine.
\r -- Release number of the OS, eg. 1.1.9.
\t -- Current time.
\u -- Number of current users logged in.
\U -- The string "1 user" or " users" where is the number of current users logged in.
\v -- Version of the OS, eg. the build-date etc.

For example :

If “/etc/issue” file contain “Debian GNU/Linux \d”

Output look like that at the prompt :

Debian GNU/Linux Web Feb 22 2017

Source : don't remember

- created date : 2017.02.22 -

change_the_banner_of_ssh.txt · Last modified: 2017/02/22 16:56 (external edit)