Suppress SSH banner when executing ad-hoc commands.
The system administrator can configure the SSH banner to display a custom message before user authentication.
$ ssh frontend.example.org
Unauthorized access to this machine is prohibited
Last login: Mon Dec 7 21:12:31 2020 from 10.0.2.2
[milosz@frontend ~]$
This means that it will be sent even when executing the ad-hoc command.
$ ssh frontend.example.org date
Unauthorized access to this machine is prohibited
Mon Dec 7 21:18:37 UTC 2020
The solution is to use quiet mode as it will suppress most warning and diagnostic messages.
$ ssh -q frontend.example.org date
Mon Dec 7 21:32:41 UTC 2020
Alternatively, use LogLevel
option.
$ ssh -o LogLevel=quiet frontend.example.org date
Mon Dec 7 21:39:25 UTC 2020