System Administration
Showing results for 
Search instead for 
Did you mean: 

sshd line filling up wtmp file

Sagar Sirdesai
Trusted Contributor

sshd line filling up wtmp file

sshd line filling up the wtmp file and hence /var is getting full.
Please advise me how can I stop this ?

Trusted Contributor

Re: sshd line filling up wtmp file


Do not think you can disable sshd logging to the wtmp file as such.

You can however reset the file using the following command:
# cat /dev/null > /var/adm/wtmp

Also, I believe I have read somewhere in the past that if you remove the wtmp file you will need to recreate it manually (it cannot be automatically created). So if you want to get rid of the file/logging (save up some space) you could try to remove the file... Of course this would mean that unsuccessful attempts are not being logged...

Hope that helps,

Frequent Advisor

Re: sshd line filling up wtmp file

May be something like logratate would help you in this situation.
For logrotate required thing is bash.
Source is also here:

You can use cron entry for that.