# Setup the service
curl -sSL https://gist.githubusercontent.com/VibroAxe/80d55cc32b5c3290d7ee8b44b9d9a8cd/raw/autossh@.service | \
sudo tee /etc/systemd/system/autossh@.service
sudo useradd -g nogroup -s /bin/false -m autossh
sudo -u autossh mkdir -p /home/autossh/.ssh # and copy your private key here
sudo -u autossh ssh-keygen -t ed25519 # Generate a new private key
Platform server side static redirects comparison
Feature | Gitlab | Cloudflare | Netlify | Example |
---|---|---|---|---|
Redirects | ✔️ Yes 200 , 301 , 302 |
✔️ Yes 301 , 302 , 303 , 307 , 308 |
✔️ Yes | /wardrobe.html /narnia.html 302 |
Rewrites | ✔️ Yes | ✔️ Yes | ✔️ Yes | /* / 200 |
Rewrites (other than 200 ) |
❌ No | ❌ No | ✔️ Yes | /en/* /en/404.html 404 |
Splats | ✔️ Yes | ✔️ Yes | ✔️ Yes | /news/* /blog/:splat |
Placeholders | ✔️ Yes | ✔️ Yes | ✔️ Yes | /news/:year/:month/:date /blog-:year-:month-:date.html |
Query parameters | ❌ No | ❌ No | ✔️ Yes | /store id=:id /blog/:id 301 |
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
#!/boot/bzImage | |
# Linux kernel userspace initialization code, translated to bash | |
# (Minus floppy disk handling, because seriously, it's 2017.) | |
# Not 100% accurate, but gives you a good idea of how kernel init works | |
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st> | |
# Based on Linux 4.10-rc2. | |
# Note: pretend chroot is a builtin and affects the current process | |
# Note: kernel actually uses major/minor device numbers instead of device name |
Follow this tutorial until step five-ish
If the test does not work because of "public key" issues, run sudo passwd sshtunnel
on the server to change the password of the user. (If sudo tail -f /var/log/auth.log
says the account is locked, this will be the issue.)
authorized_keys
should look a little like:
import time | |
import psycopg2 | |
from iter_file import IteratorFile | |
conn = psycopg2.connect(host="localhost", database="test") | |
# args = [(1,2), (3,4), (5,6)] | |
args = [(i,i+1) for i in range(1,1*10**4,2)] |
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |