Saturday, May 16, 2020

ssh - Disable password login and allow login only using key file

If you allow password login for your ssh server, a Brute Force attack can be originated on your server. Key file login is more secured and it reduces possibilities of server hack. Best practice is you should disable password login for your server.

Here are steps to disable password login.

Update the line in the file /etc/ssh/sshd_config. The line might be commented, uncomment the line and change the attribute to no
PasswordAuthentication no
Restart ssh service.

Saturday, April 11, 2020

Postfix mails stopped working

Error : warning: mail_queue_enter: create file maildrop/xxxxxx.xxxx: Permission denied
If your postfix mails stopped working because of above error, here is the solution for you.

Solution :
    cd /var/spool/postfix
    sudo chmod 1730 maildrop

Crons stopped working

Error : cron[26468]: (root) INSECURE MODE (mode 0600 expected) (crontabs/root)

If your crons have stopped working because of incorrect permissions, here is the solution for you.

Solution :
sudo chmod 600 /var/spool/cron/crontabs/root
sudo service cron restart