how do we turn off rsh logging to /var/log/messages?

Posted on 2007-08-07
Last Modified: 2008-09-17
How do you turn off logging for rsh/rlogin/rcp? I'm running CentOS 4.4 and have "replication" running between
2 machines that automatically copies over data from one machine to another. In the process there are several
rsh command executing that are logged to /var/log/messages, making it 100's of MBs in size.

I tried blanking out log_on_success in /etc/xinetd.d/rsh and restarting xinetd. Nothing in /etc/syslog.conf, nothing that I can change in /etc/xinetd.conf.

Not sure if this is hard-coded in the rshserver... any ideas?
Question by:hpotar
    LVL 45

    Expert Comment

    Hi hptoar,

    rsh (and the other rxxx) tools are quickly dying in favor of more secure mechanisms.

    Will ssh and/or scp meet your needs?


    Author Comment

    Thanks Kent. Unfortunately ssh won't meet the requirements.. Any IP changes will cause key interference.

    Either way, i believe they write to /var/log/messages anyway don't they?
    the issue would still remain in that case..
    LVL 48

    Expert Comment

    With sshd, you control the logging via the


    options in /etc/ssh/sshd_config

    Author Comment

    got anything for rsh?
    LVL 27

    Accepted Solution

    > have "replication" running between
    2 machines that automatically copies over data from one machine to another.

    Try to redirect all output from your replication commands output to /dev/null, if they run from cron, do it in crontab.

    Just append to the end of command: "> /dev/null 2>&1"

    If not it doesnt help, then some program uses syslog() library call and we can direct syslog output for special priority/facility to dev/null. If this priority/facility is too common, you should think of changing syslog daemon to something like syslog-ng (where you can filter messages, for example, by process name).


    Author Comment

    thanks nopius,
    I've already redirected all output of the script to other log files. I'll change the syslog daemon.

    thank you all.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now