/ contents / safely accessing your bash-on-windows files from windows 10

safely accessing your bash-on-windows files from windows 10

formerly: mounting your bash on windows folder over sshfs

this may be specific to alwsl

editing files created through the linux subsystem from the windows side can be problematic; the last time i did so the file disappeared on the linux side and was inaccessible even after a reboot. very microsoft.

apart from this, they've done a quite un–microsoft job of making it good. and as i live mostly in the terminal anyhoot, i haven't been in much more pain than my base pain rate (bpr) during this, probably brief, dalliance with microsoft's windows 10 operating system for x86-compatible personal computers

to get around this issue i've decided to try mounting the user directory over ssh. perhaps there are better ideas, but this was mine.

there aren't many steps to it but it took a little research, so here's what i needed to do:

1. install dokany 0.7.4

get it here: dokany#v0.7.4

the current version of WinSSHFS does not support anything higher than 0.7.4, as 0.8.0 and above broke the API. if you are reading this in the future (which you are, because that's how time works), a newer version may well be preferable.

2. download WinSSHFS

get it here: win-sshfs#1.5.12.8

3. set up sshd on the linux side

do this with the package manager for whatever distro you've installed into the subsystem.

for arch the instructions are as follows:

# pacman -S openssh
# $EDITOR /etc/ssh/sshd_config

to sshd_config add:

KexAlgorithms diffie-hellman-group14-sha1

ensure UsePAM is set to yes. i also added AllowUsers chee. if you want to use a port other than 22, set Port to whatever that port is.

# sshd

4. configure WinSSHFS

5. rejoice in the splendor of the day, it may well be your last