Skip to content

Instantly share code, notes, and snippets.

@sdktr
sdktr / Agent Passthru.md
Last active April 10, 2025 08:08 — forked from Jaykul/Agent Passthru.md
SSH Agent passthru to WSL 2 (working, in Windows 11, in April 2025)

SSH ssh agent /w WSL2

  • SSH agent running in Windows (e.g. Keeper or Keeper Commander)
  • The resulting PIPE in windows is relayed to WSL2 and made available as an SSH socket under the well known environment variable SSH_AUTH_SOCK
  • Additional filtering of the offered keys is applied on the SSH client side using ssh.conf

Installation

With Chocolatey, you must use an elevated PowerShell session. If there's no choco command found, it will fall back to winget for the npiperelay install. To force using Winget even if you have choco installed, you need to download it, so you can pass parameters to it.

Easy mode: just run this in PowerShell:

## template: jinja
#cloud-config
{% if v1.distro_release == 'focal' %}
users:
- name: sdktr
shell: /usr/bin/bash
ssh_import_id: gh:sdktr
sudo: ALL=(ALL:ALL) NOPASSWD:ALL
@sdktr
sdktr / boxstarter-w11.ps1
Last active December 19, 2024 14:32
Boxstarter Windows 11
# Description: Boxstarter Script
# Original Script is from: Jess Frazelle <[email protected]>
# Last Updated: 2020-11-18
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@sdktr
sdktr / gist:a9132132d911a0124dabf7bf4099b32c
Created September 13, 2017 12:10
ESX6.5: Cisco CSR1000V OVA deployment problem (CSCve43726)
Workaround for Cisco bug CSCve43726: CSR1000V: ova install fails on ESXI 6.5: rasd:ResourceSubType VMXNET3 virtio Update
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCve43726/?referring_site=bugquickviewclick
Fix the downloaded OVA using the COT (https://github.com/glennmatthews/cot) tool running in Docker (https://store.docker.com/community/images/safenetlabs/cot)
1) Change directory to folder that contains the problematic OVA
2) Given the downloaded file 'csr1000v_orignal.ova' execute:
docker run -it -v ${PWD}:/data safenetlabs/cot edit-hardware --nic-types vmxnet3 -o /data/csr1000v_patched.ova /data/csr1000v_original.ova