netcat – The Mighty One

terminal

Once in awhile sshd will break on your server, maybe after an update and you need to send long lines, maybe a cipher list from one server to another. Typing on console it’s an option […]

Enable Debug For Shell Scripts

terminal

Debugging shell scripts comes handy, especially when unexpected things happen. Trust me, they do. I use two different approaches, based on what’s needed: debug while running it or when ran in the background, maybe by […]

newsyslog: don’t rotate empty log files

My idea about not to rotate empty log files on FreeBSD has made it to newsyslog, yay 😀 ! Big thanks for Dan Langille who made this happen!

DNS Blacklist on WRT

Recently I found a forum entry with a script for blocking ad’s via DNS for WRT (or any other OS using sh and dnsmasq). However it was missing two features: a white list and a […]

Easy SSH On macOS

Using public key authentication for ssh is safer than password. But you should really use a passphrase protected private key. Now you are safe but you still need to type in your passphrase. This isn’t […]

newsyslog – config check

On FreeBSD the best way to rotate logs is using newsyslog. After you set up you want to try what would happen when log rotation occurs, this can be done with -n and -vv -n […]

Delete a Single Line From History

Did you ever wanted to remove a single line from your shell history? This is how you can easily do it: use: history -d line number to remove the line, for example history -d 431, […]