I’ve read Stop ssh login from printing motd from the client?, however my situation is a bit different :
- I want to keep Banner /path/to/sometxt serverside
- I would like to pass an option under specific conditions so that Banner is not printed (eg
ssh -o "PrintBanner=No" someserver).
Edit : I found the following workaround but it’s really dirty as it suppresses the Banner but also anything printed on stderr.
ssh someserver 2> /dev/null
Edit #2 : Did not find any satifying workaround => Marking question as accepted
You should be able to set a different
Banner (to none) inside a
Match Address 192.0.2.0/24 Banner none
But this has to be done server-side, based on specific conditions. You can’t do it from the client side.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.