# Attach first YubiKey found (most common use case)
.\Connect-YubiKeyToWSL.ps1| FROM python:3.11-slim | |
| # Install dependencies | |
| RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python packages | |
| RUN pip install --no-cache-dir \ | |
| Flask==3.0.0 \ |
| #!/bin/bash | |
| VT1="AF,Ashfall | |
| AS,Air Stagnation | |
| AV,Avalanche | |
| BH,Beach Hazard | |
| BS,Blowing Snow | |
| BW,Brisk Wind | |
| BZ,Blizzard | |
| CF,Coastal Flood |
Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:
nix shell nixpkgs#yubikey-manager -c ykman fido credentials listIf the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.
Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:
Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):
Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:
curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
| ZWNobzsgZWNobyAncGVybWFuZW50IGtleXMgYW5kIHBhc3Nvd3JkIHByb3RlY3RlZCBrZXlzIGFyZSA0IGxvb3NlcnMg8J+YjicgfCBjb3dzYXkgLVQgNjk7IGNhdCA8PCBFT0YKCuKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVl+KWiOKWiOKVlyAg4paI4paI4pWX4paI4paI4paI4paI4paI4paI4paI4pWXICAgICDilojilojilojilojilojilojilZcg4paI4paI4paI4paI4paI4paI4pWXIOKWiOKWiOKVlyAgICDilojilojilZcgICAg4paI4paI4pWXICDilojilojilZcg4paI4paI4paI4paI4paI4pWXIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlyAgICDilojilojilojilojilojilojilojilZfilojilojilojilojilojilojilZcgIOKWiOKWiOKWiOKWiOKWiOKWiOKVlyDilojilojilZcgIOKWiOKWiOKVl+KWiOKWiOKWiOKWiOKWiOKWiOKWiOKVl+KWiOKWiOKWiOKVlyAgIOKWiOKWiOKVl+KWiOKWiOKVlwrilZrilZDilZDilojilojilZTilZDilZDilZ3ilojilojilZEgIOKWiOKWiOKVkeKWiOKWiOKVlOKVkOKVkOKVkOKVkOKVnSAgICDilojilojilZTilZDilZDilZDilZDilZ3ilojilojilZTilZDilZDilZDilojilojilZfilojilojilZEgICAg4paI4paI4pWRICAgIOKWiOKWiOKVkSAg4paI4paI4pWR4paI4paI4pWU4pWQ4pWQ4paI4paI4pWX4paI4paI4pWU4pWQ4pWQ4pWQ4pWQ4pWdICAgIOKWiOKWiOKVlOKVkOKVkOKVkOKVkOKVneKWiOKWiOKVlOKVkOKVkOKWiOKWiOKVl+KWiOKWiOKVlOKVkOKVkOKVkOKWiOKWiOKVl+KWiOKW |
| // decrypting Amtrak's real-time train location geoJSON feed | |
| // based on https://github.com/Vivalize/Amtrak-Train-Stats | |
| const fetch = require('node-fetch'); | |
| const CryptoJS = require('crypto-js'); | |
| // this is the xhr call done by https://www.amtrak.com/track-your-train.html containing encrypted train location data | |
| const dataUrl = 'https://maps.amtrak.com/services/MapDataService/trains/getTrainsData'; | |
| // these constants are pulled from RoutesList.v.json, which is an object with keys 'arr', 's', and 'v' | |
| const sValue = '9a3686ac'; // found at s[8] |
| #!/usr/bin/env python3 | |
| import asyncio | |
| import json | |
| import logging | |
| import os | |
| import yaml | |
| from datetime import datetime |