How can I suppress /etc/issue without losing error messages?

Posted by Andy on Super User See other posts from Super User or by Andy
Published on 2009-12-17T14:52:43Z Indexed on 2010/03/26 10:03 UTC
Read the original article Hit count: 410

Filed under:
|
|
|

Is it possible to tell the ssh client to not print the connects of /etc/issue to stdout when connecting to a remote host, but to print out any other diagnostic (e.g. error) messages?

Either using ssh -q or having LogLevel quiet in ~/.ssh/config suppresses the /etc/issue printing, but also turn off error messages. I've tried touching ~/.hushlogin as well - that stops /etc/motd being printed, but doesn't affect /etc/issue.

The most obvious solution is just to remove /etc/issue, but company policy dictates the file be there with dire warnings about unauthorised access. This is non-negotiable. Unfortunately, I've got a bunch of scripts that run across quite a few hosts via ssh, and the log files are a) very large and b) full of legalese. Since quite a lot of stuff runs unattended, I don't want to lose any error messages that are printed.

© Super User or respective owner

Related posts about ssh

Related posts about banner