I've got SSH passwordless set up, however it prints the MoTD when it logs in. Is there anyway to stop that happening from the client side?
ssh -q but that doesn't work. I don't want to use
~/.hushlogin nor do I want to change the server set up. The only thing that can work is to quiet all output, with
>/dev/null 2>&1. However, I don't want to ignore errors in case there actually is a problem. Even doing
>/dev/null doesn't work, since
ssh seems to print the motd to the stderr.
Update & reasoning I'm running backup in a cron. I don't want to get a cron email unless an error has occured. However if the motd is printed I'll get an email all the time.
I want to keep the motd being printed because that has legal implications. The motd says "unathorized access prohibited". You need to have this sort of statement in there to legally prevent people from access it (like a no trespassing sign). Hence I don't want to blanket disable it all the time.