Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my logs. Looking through the man page suggest that -q should work, but that only quiets messages from scp itself. How can I do this?

share|improve this question
up vote 4 down vote accepted

For rsync, it has a --no-motd you can use to suppress the motd for your script and only see the output of what rsync is transferring. It looks like it was added in rsync 3.x since I don't see that option in 2.x.

The man page lists a caveat about not using it when trying to get a listing of modules you can rsync:


This option affects the information that is output by the client at the start of a daemon transfer. This suppresses the message-of-the-day (MOTD) text, but it also affects the list of modules that the daemon sends in response to the "rsync host::" request (due to a limitation in the rsync protocol), so omit this option if you want to request the list of modules from the daemon.

For scp, trying touching the file ~/.hushlogin. When I scp files, I don't see the motd though but your set up might be different. The man page for login has more info:

If the file .hushlogin exists, then a "quiet" login is performed (this disables the checking of mail and the printing of the last login time and message of the day). Otherwise, if /var/log/lastlog exists, the last login time is printed (and the current login is recorded).

share|improve this answer
rsync --no-motd does not work for me. The SSH MOTD is still being shown. – ntrrgc Sep 10 '13 at 16:55

In case you don't want to mess with your local ~/.ssh/config file and the --no-motd option is not working for you either, I had success setting the RSYNC_RSH env variable.

RSYNC_RSH="ssh -q" rsync

You may also try to use the rsync option -e

rsync -e 'ssh -q'
share|improve this answer

If your version of rsync doesn't support the --no-motd option, puting LogLevel quiet in ~/.ssh/config will do the trick.

share|improve this answer
The LogLevel quiet option worked for me. Note: I did have to create the file (~/.ssh/config), but I put in the one line, and voila! no more /etc/issue.net showing up! – user80656 Aug 12 '14 at 20:42

On my SuSE 11 system, I found the banner message in /etc/issue.net and then remarked out the banner line in my /etc/ssh/sshd_config file.

#banner /etc/issue.net

Then restarted the ssh daemon

service sshd restart

This suppressed the banner when using scp inside scripts and cleaned up the log files.

share|improve this answer

You can probably suppress the motd by redirecting STDERR to /dev/null, but that way you will miss all other error messages too.

scp src dst 2> /dev/null
share|improve this answer
This is not an option, all output is being directed to a log file that needs review later - errors are important! – Hooked Dec 27 '12 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.