Suppressing ssh banner from OpenSSH client

I am logging into a server which has an ssh banner set. I would like to suppress it (especially for non-interactive use). I do not have access to the server sshd_config.

The best solution I have found so far is to set the LogLevel ERROR option on the client. The problem is that this will suppress any other INFO level messages, which I don't necessarily want to hide (search the OpenSSH source for logit for examples). I could also use ssh -q but that will suppress even more.

Are there any other more specific solutions?


Solution 1:

AFAIK, "ssh -q" or "LogLevel QUIET" in ~/.ssh/config are the "traditional" ways to silence the banner. So you already have a "better" compromise with "LogLevel ERROR".

A more specific solutions would be to use a custom patched version of the ssh client, if this is an option.

Solution 2:

You can also use:

Banner none

on

/etc/ssh/sshd_config