Category: Linux

  • How To: Linux – View Squid Proxy’s Active Cache Store

    Ever wanted to see whats going through Squid’s cache right at the moment? But get immediately discouraged with all the timestamps, SWAPOUT, RELEASE and other cache variables? I have a one-line for you! ~ # tail -f /var/log/squid/store.log|grep -oE ‘\b(http?)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]’ This will print out visited links that passes by squid in real time, it can…

  • How To: TOTP 2FA Linux SSH Using Google-Authenticator

    Using only a username and password for authentication is no longer secure. With user-database dumps reaching millions of exposed, albeit hashed and salted, passwords. Secure authentication should include not only something you know, but also something you have (in your pocket… always). There have been several OTP and general 2FA solutions for Linux. From SMS…

  • GPIO Sensors Fun – Keyes DS18b20 1-Wire for the Raspberry Pi

    I’ve been using my Raspberry Pi as a replacement for another bulky server/heating element I used two years ago. Since then, the Credit Card sized hardware with it’s 8 Gigabyte SD-card, has endured the role of a NTP, DNS, OpenVPN, HTTP and SSH-terminal server. With no crashes or slowdowns (within expectable limits) to speak of,…

  • How to: Mount remote storage using sshfs

    For me, SSH has replaced three very flaky protocols. Telnet (true story) for an networked shell, FTP handling simple file transfers and finally NFS mounting network attached storage. SSH provides the -encrypted- networked shell, handles simple file transfers using SCP or SFTP, and has the power to mount filesystems using SSHFS. All in one protocol!…

  • How To: Monitor NetCat File Upload Progress using PV

    Using NetCat to upload files can sometimes be handy, however it would be awesome if you could track the upload ETA and not just stare patiently for a prompt. PV, or “Pipe Viewer”, is a handy little command that allows you to track the progress of any Unix pipe. Using it as an replacement for…