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 05:32:18 -0700 (PDT) |
--- Greg Wooledge <wooledg@eeg.ccf.org> wrote:
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.
Yeah that's an idea.
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.
Oops, good catch. I forgot to mention I'd already tried that. That doesn't work because the banner gets sent to the 2 file descriptor. The errors.txt file /always/ has content, so this test is useless: if [ -s errors.txt ] Try it and see. Anyway, I think I have a workaround. Trap errors to errors.txt on the server side and then scp it back to the client. Kludgy, but so far it's working. I wrote this list because I was looking for a flag within the SSH client itself, and apparently there is not one. CD Are you good enough? TenThousandDollarOffer.com
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Tacacs and OpenSSH, Gary Schlachter |
|---|---|
| Next by Date: | Re: Tacacs and OpenSSH, Asif Iqbal |
| Previous by Thread: | Re: How do I silence the banner?, Greg Wooledge |
| Next by Thread: | Re: !!!Urgent Help with SFTP in C++/Shell !!!, Ed J. Ayvazyan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |