Roundup for week ending May 5th
Authored on 2024-05-05
Viruses be damned
I've been in the grips of a cold this whole week, hence not a lot of time and energy to dedicate to, well, anything really.
OpenSSH server on Windows
That said, I had a very ambitious goal of setting up OpenSSH server on my WSL2 box, to make admin tasks somewhat
more manageable. Little did I know how perilous this would end up being. I've started by following Scott
Hanselman's
advice
and things worked! Well, at least ssh'ing into my WSL2 box worked, but that is a start. Next on my list was
"let's see if I can make it use pubkey authentication". This turned out to be less doable. After populating all
variations of authorized_keys
file across a number of filesystems, I've accepted defeat in this battle and
moved on to the next goal -- ssh into Windows box. Fortunately, there's a very clean blog post by Kartikey
Chauhan with a clear set of steps
required to achieve my goal. This (unsurprisingly) worked, but the pubkey auth still eluded me. Disabling
password authentication would leave me without ability to login, as my key would not be accepted no matter what.
Desperate, I've turned to life of crime prompt engineering scouring the interwebs. First helpful tip was to
run sshd in debug mode. This did make it clear to me that the key served
by ssh client was plain not matched with any authorized key known by ssh server. I almost lost hope until I came
across this
comment
on StackOverflow which made it all work. In hindsight this was quite obviously documented by Win32-OpenSSH
maintainers,
but who reads documentation anyway?
Anyway, now I know how to do it.
Frankenstein's Ansible
I've managed to merge all my scattered playbooks into a single Frankenstein's monster but it is quite a bit far removed from ideal state. I think this at least gives me ability to iterate further without losing track of what I'm doing after every evening hacking session.
Along the way I've discovered ansible-lint which I would put into category of "mildly useful".
Mise/asdf
I've been a user of direnv for about two years and have really appreciated how it fit my workflow, where I have
to jump between Python, Terraform, Helm, Golang and Lua repos dozens of times per day but lately I've been
itching for something that would ensure my tools don't break after I ran brew update
. You know, like it did 3
weeks ago with Poetry.
Anyway, I'm looking at Mise right now and it is quite interesting. It doesn't have the inherent complexity of Nix and seems to be just complex enough to be useful while being simple enough to be understood (yes, my tiny little brain is incapable of understanding Nix, flakes, NixOS and the rest of that). So far my progress is "installed mise" and "skimmed the guide" but I will continue on this thread, I promise.