SSH client option to suppress server banners

bannerssh

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?

Best Answer

You can't. (At least not with stock OpenSSH)

The server banner is sent by the server before authentication happens. It's point is usually to contain a legal disclaimer or similar "If you're not authorized disconnect NOW" type message, or other critical things you don't want the remote user to be able to suppress/ignore.

If you really want to get rid of this you will need to hack and compile your own customized version of the SSH client.

Related Topic