Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: How do I silence the banner? |
|---|---|
| Date: | Tue, 1 Aug 2006 07:55:15 -0400 |
On Mon, Jul 31, 2006 at 10:31:45AM -0700, Chris de Vidal wrote:
I am using the Banner option in my sshd_config, but some scripts see the banner and interpret it as an error.
So... uh... don't do that?
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.
grep -v comes to mind. Or, you could run a separate instance of sshd on another port, with no banner enabled, and have your scripts connect to the alternative port.
I currently am doing this:
if ssh user@server command > good_output 2> errors.txt
then
email "Command successful."
else
email "Problem."
email errors.txt
fi
But that traps the SSH banner and I always get "Problem" even when the
command was successful.
You're checking the exit status of the ssh process. You're not checking
the output of the command. So your last sentence makes no sense.
If your code had actually read:
ssh user@server command > good_output 2> errors.txt
if [ -s errors.txt ]; then
email "Command successful."
else
email "Problem"
email errors.txt
fi
*then* your last sentence would have made sense. But it doesn't.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: !!!Urgent Help with SFTP in C++/Shell !!!, Ed J. Ayvazyan |
|---|---|
| Next by Date: | Re: Tacacs and OpenSSH, Gary Schlachter |
| Previous by Thread: | Re: How do I silence the banner?, Darren Tucker |
| Next by Thread: | Re: How do I silence the banner?, Chris de Vidal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |