15

Is there a way to suppress the banner output that's sent from sshd using the Banner option when using ssh clients like ssh or scp?

I've looked at the options and config file, but can't seem to find anything.

  • Set Banner to none in sshd_config? – Satō Katsura Oct 31 '16 at 8:51
  • @SatoKatsura: I can't control the sshd_config as I'm not root on that box, unfortunately... – dirkt Oct 31 '16 at 9:02
21

Use the -q (quiet) option to ssh and scp, to suppress the /etc/motd (and related) messages.

While Banner might seem to be related, it is not. Refer to sshd_config manual:

The contents of the specified file are sent to the remote user before authentication is allowed. If the argument is none then no banner is displayed. By default, no banner is displayed.

You could use PrintMotd (in sshd_config):

PrintMotd
Specifies whether sshd(8) should print /etc/motd when a user logs in interactively. (On some systems it is also printed by the shell, /etc/profile, or equivalent.) The default is yes.

but in scripting, I simply use the -q option (requiring less configuration of the server).

  • Thanks, -q also works to supress the Banner. – dirkt Oct 31 '16 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.