Ssh login banner

From Andreida
Revision as of 11:48, 16 February 2016 by Andreas (talk | contribs) (Created page with "sshd uses /etc/motd as banner when someone logs in. The file looks something like this: Linux myhostname 2.6.18-6-amd64 #1 SMP Sun Feb 21 00:50:59 UTC 2010 x86_64 The progr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

sshd uses /etc/motd as banner when someone logs in. The file looks something like this:

Linux myhostname 2.6.18-6-amd64 #1 SMP Sun Feb 21 00:50:59 UTC 2010 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

You can not use the tty commands from /etc/issue inside this file. \n \l etc.. will not work.

Sometimes this file will be recreated.

disable motd for ssh login

/etc/pam.d/sshd

 # Print the message of the day upon successful login.
 # session    optional     pam_motd.so # [1]