How do I silence the banner?
- From: Chris de Vidal <chris@xxxxxxxxxx>
- Date: Mon, 31 Jul 2006 10:31:45 -0700 (PDT)
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."
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?
- Prev by Date: !!!Urgent Help with SFTP in C++/Shell !!!
- Next by Date: Incremental delay in ssh
- Previous by thread: !!!Urgent Help with SFTP in C++/Shell !!!
- Next by thread: Re: How do I silence the banner?