Hey all,
I have a non-human user account that logs into remote systems via RSA key, and executes scripts on a cron, and I capture the output of these cron jobs in files, here is an example:
Parsing the logs from these crons I notice that the logs contained the output from the remote server's /etc/motd that these PHP files log into. Since the jobs run so frequently, the logs fill up 10-20x faster and are harder to parse due to the banner being included (since the banner is returned before an authentication occurs), and are becoming a disk utilization problem.
As one try, I put a ~/.hushlogin on the remote server, into this non-human user's home directory. This did remove the /etc/motd output from returning when I
So how do I get the ~/.hushlogin to hush the banner as well? The only other thing I thought might work is putting a ~/.login.conf on the remote server that contains the environment variable
. But I'm not sure of the syntax or what a complete login.conf(5) should look like.
Is the ~./login.conf a viable option, or is there a better way to do this?
SK
I have a non-human user account that logs into remote systems via RSA key, and executes scripts on a cron, and I capture the output of these cron jobs in files, here is an example:
Code:
*/10 * * * * /usr/local/etc/data_checker.php >> /data/log/data_checker_daemon.log 2>&1
Parsing the logs from these crons I notice that the logs contained the output from the remote server's /etc/motd that these PHP files log into. Since the jobs run so frequently, the logs fill up 10-20x faster and are harder to parse due to the banner being included (since the banner is returned before an authentication occurs), and are becoming a disk utilization problem.
As one try, I put a ~/.hushlogin on the remote server, into this non-human user's home directory. This did remove the /etc/motd output from returning when I
ssh into the remote server as the non-human user (or when the cron jobs ran). However, I still see the output of the banner /etc/ssh/sshd_config for the user both on the CLI and from the cron jobs. This is the banner line entry on the remote server that I'm logging into:
Code:
banner /etc/mybanner
So how do I get the ~/.hushlogin to hush the banner as well? The only other thing I thought might work is putting a ~/.login.conf on the remote server that contains the environment variable
Code:
hushlogin=false
Is the ~./login.conf a viable option, or is there a better way to do this?
SK