2

I can't hide or delete the banner when I'm logging in via ssh. This is my example: "Linux aedd7472f871 6.1.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.12-1kali2 (2023-02-23) x86_64"

enter image description here

How do I delete this message?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
umar3
  • 31
  • 2

1 Answers1

3

Option 1:

Add the following in /etc/ssh/sshd_config:

Banner /etc/banner

or

Banner /folder/mybannerfile

Write the message you want in the file and restart sshd

Option 2:

It seems it is possible to disable this message on a user basis by creating an empty file in a user's $HOME directory (/home/username/) called .hushlogin

touch ~/.hushlogin

Option 3:

In /etc/ssh/sshd_config make sure there is a line:

PrintMotd no

Option 4:

.hushlogin didn't do the trick for me, but setting Banner to /dev/null in /etc/ssh/sshd_config :

Banner /dev/null

Sources:

muru
  • 69,900
  • 13
  • 192
  • 292
Z0OM
  • 1
  • 4
  • 24
  • 56