BackupPC can’t backup cPanel host

You probably noticed that BackupPC fails to backup your cPanel host over rsync with the following error:

Got fatal error during xfer (fileListReceive failed)

Nothing else. Nada.

If you increase the ssh verbosity, you will see that there is an error stdin: is not a tty.

It turns out that cPanel adds mesg y to your .bashrc and /etc/bashrc, which somehow messes up the remote rsync data channel over ssh.

To overcome this issue, add on top of your .bashrc and /etc/bashrc on cPanel host: