How do I silence the banner?

Client: OpenSSH_4.2p1 Debian-7ubuntu3, OpenSSL 0.9.8a 11 Oct 2005
Server: OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7e 25 Oct 2004

I am using the Banner option in my sshd_config, but some scripts see the banner and interpret it
as an error.

How can I -- on the client side -- silence the banner? I don't want to silence the banner for
everyone, I just want to silence it on the client for a few scripts.

For example, I have a script that's something like this:
ssh user@server command > good_output.txt

But I want to trap errors.

I currently am doing this:
if ssh user@server command > good_output 2> errors.txt
email "Command successful."
email "Problem."
email errors.txt

But that traps the SSH banner and I always get "Problem" even when the command was successful.

If I just wanted to silence the banner, I would do something like this:
ssh user@server command > good_output.txt 2> /dev/null

But that doesn't work here because I want any errors reported back to me.

I tried this:
ssh user@server "command 2>&1" > good_output.txt 2> /dev/null

But that doesn't work for me because errors get mixed with good output.

Dunno what to do.


Are you good enough?

Relevant Pages

  • SSHD Banners and rsync (or other inter-server commands)
    ... This is not specifically a SuSE issue, however we are using SuSE so ... Where a simple rsync command previously ... provided a few lines of output, it now displays the entire SSH banner ...
  • RE: security through obscurity (was: Re: remove apache os banner
    ... Something as simple as changing banners can ... stop some automated scripts and keep out some wannabe script-kiddies. ... It may not add any "security", ... And if modifying a banner or ...
  • Re: Printing to Canon IR7200 from Solaris 8
    ... They're trying to print from this Oracle ... "Financials" thing I'm not at all familiar with. ... print both the job and the banner page. ... the command line, the jobs print fine. ...
  • Re: Banner Ad
    ... Ad Banner is still there it has just be depreciated because of Windows not support Java directly. ... It is located in the command ... Mike -- FrontPage MVP '97-'02 ... no longer have the Banner ad feature and I have to say that I was quote addicted to that feature! ...
  • Re: cant send/receive email 2 weeks after XP sp2 update
    ... > if mail server is same as mail client it is POP3 ... > If command line is Run ... > and a banner is a DOS window when I type in ... >> respectively, in a command line, and get a banner? ...