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"
How do I delete this message?
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"
How do I delete this message?
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
It seems it is possible to disable this message on a user basis by creating an empty file in a user's
$HOMEdirectory (/home/username/) called.hushlogintouch ~/.hushlogin
In
/etc/ssh/sshd_configmake sure there is a line:PrintMotd no
.hushlogindidn't do the trick for me, but setting Banner to/dev/nullin/etc/ssh/sshd_config:Banner /dev/null
Sources: