Wednesday, February 15, 2012

Configuring SSH: Suppressing the Banner

Tired of receiving cronmail because the ssh banner is sent to STDERR?  Tired of not being able to see real errors because the banner pollutes your log?

For interactive sessions:
  • ssh -q
This sets ssh's LogLevel to Quiet.  This means *only* Fatal logging events are logged.  This suppresses Error logging events that you may be interested in.

  • ssh -o LogLevel=error
This sets ssh's LogLevel to Error.  This may not work in older ssh clients.  This allows you to see Error logging events that may be important.  You can also set this in your client config.

Or modify your config:
  1. Open your ssh config for editing. ie. vim ~/.ssh/config
  2. Add a host entry for the servers you want to access through the ssh proxy.
LogLevel error

§