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.


1 Answer 1


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

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

  • 2
    Thanks, -q also works to supress the Banner.
    – dirkt
    Oct 31, 2016 at 9:03
  • 2
    "-q" on Solaris 5.10 did not suppress the banner, only the file transfer status. Apr 27, 2020 at 20:43
  • 1
    works for ssh, Thanks. I also try via gitbash did scp to Ubuntu 16.04.7 LTS (Xenial Xerus) "-q" suppress banner and file transfer status. Would be great if the file transfer status is kept. :/
    – Yusufmm
    Feb 8, 2021 at 2:30
  • 3
    Unfortunately, -q suppresses everything. Too bad there's only a "suppress banner".
    – RonJohn
    Nov 5, 2021 at 23:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .