SSH client option to suppress server banners?

user130370 asked:

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).

Any idea?

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

My answer:


You should be able to set a different Banner (to none) inside a Match block.

For instance:

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.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.