Website : https://dropgala.com
check: how-to-connect-pgadmin4-to-db-through-ssh-tunnel-with-public-key-authentication
Nginx-keepalive: Here
Setting an environment variable for a droplet is a little more complicated than for an app running on the app platform.
Follow these steps to set environment variables on a Linux droplet:
SSH into your droplet. If you’re not sure how to do that, see here Once connected, run the following command to set your environment variable:
$ export YOUR_VARIABLE_KEY=<your-variable-value>
fail2ban: https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-04
Secure a containerized nodejs application with nginx: Here
Logfiles with logrotate on ubuntu: Here
Secure environment_variables in yaml: Here
$ tail -f /var/log/cron.log
Let's Encript renew Logs
$ tail -f /var/log/cron.log
$ sudo cat /var/log/auth.log
If you want to check for compromise, look at wtmp (type who), and look at the system logs. Audit records in syslog (like "session opened for user james") will shed some light.
$ who
You could also look for users you do not recognize, and inspect traffic and connections
$ netstat -nvlp