The cause is that a Ubuntu server crontab has failed to regularly run the scp backup script. It is okay to manually execute the script. Therefore, you need to find the cause from the crontab log, suddenly I found that no cron logs exist in my/var/log. Here I will record how to modify tuserver, how to view crontab logs, and how to modify rsyslogsudovim/etc/rsyslog. d/50-default.confcron
Cause
Today, I found that an Ubuntu server crontab failed to regularly run the scp backup script. It is okay to manually execute the script. So I want to find the cause from the crontab log, I suddenly found no cron logs under my/var/log. Here I will record how to view crontab logs on ubuntu server.
Crontab logs
Modify rsyslog
Sudo vim/etc/rsyslog. d/50-default.conf
Cron. */var/log/cron. log # Remove the annotator before cron.
Restart rsyslog
Sudo service rsyslog restart
View crontab logs
Less/var/log/cron. log
Crontab problem locating
View logs
/Var/log/cron. log and/var/mail/$ user
Because the running logs of crontab are recorded in cron. log, the sendmail service will send an email to the current running owner of crontab.
Ssh error message
Solution
Delete the. ssh/hosts file of the current host user.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2