Adding HTTP Security Headers to a Hugo Site on Netlify

Hardening the security headers to defend against cross-site scripting and clickjacking

Three years are about to pass since this site moved to Hugo. I configured the HTTP security headers for the site, which had been left alone for a while. They are directives used by web applications to configure security measures in the web browser, and they are used to defend against things like cross-site scripting and clickjacking This article covers the configuration for the Hugo + Netlify environment that this site uses Also, I will leave out explanations of the configuration terminology [Read More]

No Matching Host Key Type Found After Upgrading to OpenSSH 8.8

OpenSSH 8.8 disables RSA signatures

I updated openssh with Homebrew on my Mac, and after the version went up I could no longer connect, with the error below. Copy ERROR: Unable to negotiate with 192.168.1.10 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss The error did not appear for every destination; the ones I could no longer reach were those running relatively old operating systems. SSH that can connect Copy $ ssh -V OpenSSH_8.4p1 Debian-5, OpenSSL 1.1.1k 25 Mar 2021 SSH that cannot connect Copy $ ssh -V OpenSSH_8.9p1, OpenSSL 1.1.1n 15 Mar 2022 Looking into it, the cause is that RSA keys with SHA-1 have been disabled since OpenSSH8.8 [Read More]

Creating Password-Protected ZIP Files on Linux and macOS

Creating a password-protected zip, and adding a password to an existing zip file

The other day, while self-hosting Bitwarden with Docker , I realised that leaving the data exported from LastPass and 1Password lying around as it is would be dangerous. Deleting it once it is no longer needed is probably the best answer, but I wanted to keep it as a backup, so I decided to save it as a password-protected zip. Creating a password-protected zip When you want to create a password-protected zip from a file Copy $ zip -e sample.zip sample.txt Enter password:<enter the password> Verify password:<enter the password> adding: test (stored 0%) When you want to create a password-protected zip from a directory When a directory is involved you need to be careful, because if you forget the -r option you end up with an empty zip file [Read More]

Self-Hosting Bitwarden with Docker as a LastPass Replacement

Migrating from LastPass to Bitwarden

Since the free version of LastPass gets a device limit from the middle of March, I wanted to move away from LastPass sooner rather than later, so I looked into whether there was any open source password manager out there, and Bitwarden looked good, so — as always — I tried self-hosting it with Docker. What I do for the work is almost the same as the article below ↓ Bitwarden Here is the official site. If you are not going to self-host, it is easier to create an account and use that [Read More]

How to Find the Subnet Range of an ISP with whois

Usable not only for ISPs but for any organisation

There are times when you want to know the subnet range of an ISP or similar. For example, when you want to allow SSH only from your home subnet on an external server such as AWS or a VPS, and therefore want to know the range of the dynamic IP in your home environment. You can look it up with whois, which is a surprisingly simple method (well, the web based JPNIC WHOIS Gateway (in Japanese) is simple too…) [Read More]