LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-23-2005, 01:49 PM   #1
sswaminath
LQ Newbie
 
Registered: Jul 2005
Location: Phoenix
Posts: 2

Rep: Reputation: 0
How to remove ssh headers from log file?


Hi!

My name is swami and am a new joinee. Well, I have a question. In my ksh script, I would like to test for presence of a folder on a remote machine thro's ssh. In my code,I'm looking for status. I want only error messages to appear on screen and log file. I'm getting these, as well as ssh header messages , in my log file, as well as screen. Is there any way to turn off header in ssh, when it logs on to a remote machine.

I'm enclosing sample output below!

"
Red Hat Linux Advanced Server release 2.1AS/\m (Pensacola)
**************************************************
THIS SYSTEM IS RESTRICTED TO AUTHORIZED USERS AND
BUSINESS PURPOSES ONLY. INDIVIDUALS ATTEMPTING
UNAUTHORIZED ACCESS AND NON-BUSINESS UTILIZATION
ARE LIABLE FOR DAMAGES INCLUDING THE VALUE OF
DIVERTED RESOURCES AND CRIMINAL PROSECUTION.
**************************************************

By continuing to login you acknowledge the above and accept
responsibility for all of your actions."

ERROR! ERROR!****nap found but apps not found under /amex/webroot/nap folder! on lpliu012 server!***** Exiting...ERROR! ERROR!
Please check /var/tmp/HODInstall0507231047.log for errors or other information

I don't want these headers inside the log file or appearing on the screen. If I direct o/p to null, nothing comes up. Any ideas are most welcome.

Regards
S.Swaminath.
 
Old 07-25-2005, 12:43 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Have you tried redirecting only stderr to /dev/null? (i.e., ssh ... 2>/dev/null).

Other than that, I don't think it's possible to simply suppress that output.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove SSH users? o3h Linux - Software 2 12-01-2005 09:25 PM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 06:00 PM
what log file generator that support squid log? heero82 Linux - Software 2 07-11-2003 09:52 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 09:38 PM
/var/log/httpd/error_log:Premature end of script headers! katana Linux - General 0 08-14-2001 07:41 AM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration